Skip to content

Commit 64547e9

Browse files
committed
Reduce item list size for a few tests.
Now that these slot updates use stop-the-world, these two tests are quite a lot slower. Reduce size of the items list from 1000 to 100.
1 parent 0c328cc commit 64547e9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Lib/test/test_opcache.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,7 @@ class TestRacesDoNotCrash(TestBase):
566566
# Careful with these. Bigger numbers have a higher chance of catching bugs,
567567
# but you can also burn through a *ton* of type/dict/function versions:
568568
ITEMS = 1000
569+
SMALL_ITEMS = 100
569570
LOOPS = 4
570571
WRITERS = 2
571572

@@ -609,7 +610,7 @@ class C:
609610
__getitem__ = lambda self, item: None
610611

611612
items = []
612-
for _ in range(self.ITEMS):
613+
for _ in range(self.SMALL_ITEMS):
613614
item = C()
614615
items.append(item)
615616
return items
@@ -780,7 +781,7 @@ class C:
780781
__getattribute__ = lambda self, name: None
781782

782783
items = []
783-
for _ in range(self.ITEMS):
784+
for _ in range(self.SMALL_ITEMS):
784785
item = C()
785786
items.append(item)
786787
return items

0 commit comments

Comments
 (0)