File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
ldclient/testing/impl/datasystem Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -269,7 +269,8 @@ def test_fdv2_falls_back_to_fdv1_on_polling_success_with_header():
269269
270270 def listener (flag_change : FlagChange ):
271271 changes .append (flag_change )
272- changed .set ()
272+ if flag_change .key == "fdv1-update-flag" :
273+ changed .set ()
273274
274275 set_on_ready = Event ()
275276 fdv2 = FDv2 (Config (sdk_key = "dummy" ), data_system_config )
@@ -278,13 +279,12 @@ def listener(flag_change: FlagChange):
278279
279280 assert set_on_ready .wait (1 ), "Data system did not become ready in time"
280281
281- # Update flag in FDv1 data source to verify it's being used
282- td_fdv1 .update (td_fdv1 .flag ("fdv1-fallback-flag" ).on (False ))
282+ # Update a different flag than the one in initial data to verify FDv1 is
283+ # actively processing updates (not just init)
284+ td_fdv1 .update (td_fdv1 .flag ("fdv1-update-flag" ).on (True ))
283285 assert changed .wait (2 ), "Flag change listener was not called in time"
284286
285- # Verify we got flag changes from FDv1
286- assert len (changes ) > 0
287- assert any (c .key == "fdv1-fallback-flag" for c in changes )
287+ assert any (c .key == "fdv1-update-flag" for c in changes )
288288
289289
290290def test_fdv2_falls_back_to_fdv1_with_initializer ():
You can’t perform that action at this time.
0 commit comments