Commit 43bfeff
authored
Fix race in agentless config source listener test
scheduledPollContinuesAfterListenerRuntimeException waited on
FakeClient.calls, which is incremented when a request starts rather than
when it completes. The barrier therefore released as soon as the second
poll began, letting the assertion race the poll thread that applies the
configuration and notifies the listener.
Wait on a CountDownLatch counted down by the listener itself, so the
second notification is guaranteed to have happened before the
assertions run.
Environment: Datadog workspace
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: vickie.fridge <vickie.fridge@datadoghq.com>1 parent 5ce7fa3 commit 43bfeff
1 file changed
Lines changed: 7 additions & 2 deletions
File tree
- products/feature-flagging/feature-flagging-lib/src/test/java/com/datadog/featureflag
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
920 | 920 | | |
921 | 921 | | |
922 | 922 | | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
923 | 926 | | |
924 | 927 | | |
925 | | - | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
926 | 931 | | |
927 | 932 | | |
928 | 933 | | |
929 | 934 | | |
930 | 935 | | |
931 | 936 | | |
932 | 937 | | |
933 | | - | |
| 938 | + | |
934 | 939 | | |
935 | 940 | | |
936 | 941 | | |
| |||
0 commit comments