From c45b324e862e918db8db4a3d4ec4b30781599145 Mon Sep 17 00:00:00 2001 From: Laurent Savaete Date: Wed, 9 Nov 2022 19:41:30 +0100 Subject: [PATCH 1/2] Write a valid final state message at the end of each stream sync --- singer_sdk/tap_base.py | 1 + 1 file changed, 1 insertion(+) diff --git a/singer_sdk/tap_base.py b/singer_sdk/tap_base.py index 6e7220eda..9a1b5ccb7 100644 --- a/singer_sdk/tap_base.py +++ b/singer_sdk/tap_base.py @@ -380,6 +380,7 @@ def sync_all(self) -> None: stream.sync() stream.finalize_state_progress_markers() + stream._write_state_message() # this second loop is needed for all streams to print out their costs # including child streams which are otherwise skipped in the loop above From eb6e7a7376cd38f882f106158bdbae7dda900771 Mon Sep 17 00:00:00 2001 From: Eric Boucher Date: Wed, 9 Nov 2022 22:50:12 +0100 Subject: [PATCH 2/2] Update test_countries_sync.py --- tests/core/test_countries_sync.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/core/test_countries_sync.py b/tests/core/test_countries_sync.py index 9161e2c06..6022d0002 100644 --- a/tests/core/test_countries_sync.py +++ b/tests/core/test_countries_sync.py @@ -130,4 +130,4 @@ def tally_messages(messages: list) -> Counter: assert counter["SCHEMA", "countries"] == 1 assert counter["BATCH", "countries"] == 1 - assert counter[("STATE",)] == 2 + assert counter[("STATE",)] == 4