Skip to content

Commit f75e3f1

Browse files
committed
fix race condition
1 parent b266010 commit f75e3f1

File tree

1 file changed

+8
-1
lines changed
  • dev-packages/browser-integration-tests/suites/integrations/featureFlags/growthbook/onError/basic

1 file changed

+8
-1
lines changed

dev-packages/browser-integration-tests/suites/integrations/featureFlags/growthbook/onError/basic/test.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,14 @@ sentryTest('GrowthBook onError: basic eviction/update and no async tasks', async
4949
const event = envelopeRequestParser(req);
5050

5151
const values = event.contexts?.flags?.values || [];
52-
const expectedFlags = [{ flag: 'feat2', result: false }];
52+
53+
// After the sequence of operations:
54+
// 1. feat1-feat100 are added (100 items)
55+
// 2. feat101 is added, evicts feat1 (100 items: feat2-feat100, feat101)
56+
// 3. feat3 is updated to true, moves to end (100 items: feat2, feat4-feat100, feat101, feat3)
57+
// 4. bool-feat is added, evicts feat2 (100 items: feat4-feat100, feat101, feat3, bool-feat)
58+
59+
const expectedFlags = [];
5360
for (let i = 4; i <= FLAG_BUFFER_SIZE; i++) {
5461
expectedFlags.push({ flag: `feat${i}`, result: false });
5562
}

0 commit comments

Comments
 (0)