Skip to content

Commit c5f30bc

Browse files
committed
temp debugging
1 parent 2ca4af0 commit c5f30bc

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

ldclient/impl/datasystem/fdv2.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,7 @@ def _run_initializers(self, set_on_ready: Event):
307307
log.info("Attempting to initialize via %s", initializer.name)
308308

309309
basis_result = initializer.fetch(self._store)
310+
print("@@@@@@", "init", basis_result, "\n")
310311

311312
if isinstance(basis_result, _Fail):
312313
log.warning("Initializer %s failed: %s", initializer.name, basis_result.error)
@@ -446,6 +447,7 @@ def _consume_synchronizer_results(
446447
def reader(self: 'FDv2'):
447448
try:
448449
for update in synchronizer.sync(self._store):
450+
print("@@@@@@", "update is at", update, "\n")
449451
action_queue.put(update)
450452
finally:
451453
action_queue.put("quit")

ldclient/testing/impl/datasystem/test_fdv2_datasystem.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,14 @@ def listener(flag_change: FlagChange):
3636
count += 1
3737
changes.append(flag_change)
3838

39-
if count == 2:
39+
if count >= 2:
4040
changed.set()
4141

4242
fdv2.flag_tracker.add_listener(listener)
4343

4444
fdv2.start(set_on_ready)
4545
assert set_on_ready.wait(1), "Data system did not become ready in time"
46+
changed.clear()
4647

4748
td_synchronizer.update(td_synchronizer.flag("feature-flag").on(False))
4849
assert changed.wait(1), "Flag change listener was not called in time"

0 commit comments

Comments
 (0)