Skip to content

Commit 8c74a0c

Browse files
committed
Reduce number of items in test for slot updates.
Now that stop-the-world is used to do the slot update, these tests are a lot slower in the free-threaded build. Test with fewer items, which will still hopefully be enough to find bugs in the specializer.
1 parent e9516c7 commit 8c74a0c

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Lib/test/test_opcache.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,7 @@ class TestRacesDoNotCrash(TestBase):
576576
# Careful with these. Bigger numbers have a higher chance of catching bugs,
577577
# but you can also burn through a *ton* of type/dict/function versions:
578578
ITEMS = 1000
579+
SMALL_ITEMS = 100
579580
LOOPS = 4
580581
WRITERS = 2
581582

@@ -619,7 +620,7 @@ class C:
619620
__getitem__ = lambda self, item: None
620621

621622
items = []
622-
for _ in range(self.ITEMS):
623+
for _ in range(self.SMALL_ITEMS):
623624
item = C()
624625
items.append(item)
625626
return items
@@ -790,7 +791,7 @@ class C:
790791
__getattribute__ = lambda self, name: None
791792

792793
items = []
793-
for _ in range(self.ITEMS):
794+
for _ in range(self.SMALL_ITEMS):
794795
item = C()
795796
items.append(item)
796797
return items

0 commit comments

Comments
 (0)