From 6921131db1fe6e1a5073a392d98559f5eecb39f0 Mon Sep 17 00:00:00 2001 From: btowles Date: Wed, 1 May 2024 17:05:20 +0000 Subject: [PATCH 1/4] Update orders stream for interrupted sync again --- tests/test_interrupted_sync.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/test_interrupted_sync.py b/tests/test_interrupted_sync.py index 508c7cc..57a2685 100644 --- a/tests/test_interrupted_sync.py +++ b/tests/test_interrupted_sync.py @@ -200,9 +200,12 @@ def test_run(self): # This is the expected behaviour for shopify as they are using date windowing # TDL-17096 : Resuming bookmark value is getting assigned from execution time # rather than the actual bookmark time for some streams. - # TODO orders and transactions streams are equal, confirm this behavior is correct - if stream == 'transactions' or stream == 'orders': + # TODO transactions stream has equal bookmarks, orders stream has shown both + # equal and greater than bookmark behavior, confirm this behavior is correct + if stream == 'transactions': self.assertEqual(resuming_bookmark_value, first_bookmark_value) + if stream == 'orders': + self.assertGreaterEqual(resuming_bookmark_value, first_bookmark_value) else: self.assertGreater(resuming_bookmark_value, first_bookmark_value) From d5ddf7e4923ad9787f815b3ed582f1c5a50088cb Mon Sep 17 00:00:00 2001 From: btowles Date: Wed, 1 May 2024 17:09:22 +0000 Subject: [PATCH 2/4] Revert "Update orders stream for interrupted sync again" This reverts commit 6921131db1fe6e1a5073a392d98559f5eecb39f0. --- tests/test_interrupted_sync.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tests/test_interrupted_sync.py b/tests/test_interrupted_sync.py index 57a2685..508c7cc 100644 --- a/tests/test_interrupted_sync.py +++ b/tests/test_interrupted_sync.py @@ -200,12 +200,9 @@ def test_run(self): # This is the expected behaviour for shopify as they are using date windowing # TDL-17096 : Resuming bookmark value is getting assigned from execution time # rather than the actual bookmark time for some streams. - # TODO transactions stream has equal bookmarks, orders stream has shown both - # equal and greater than bookmark behavior, confirm this behavior is correct - if stream == 'transactions': + # TODO orders and transactions streams are equal, confirm this behavior is correct + if stream == 'transactions' or stream == 'orders': self.assertEqual(resuming_bookmark_value, first_bookmark_value) - if stream == 'orders': - self.assertGreaterEqual(resuming_bookmark_value, first_bookmark_value) else: self.assertGreater(resuming_bookmark_value, first_bookmark_value) From 4b44bd56656d88bb1b4a816fe4285bb83b464f15 Mon Sep 17 00:00:00 2001 From: btowles Date: Wed, 1 May 2024 18:00:42 +0000 Subject: [PATCH 3/4] Push fix the correct way this time, update int sync orders stream --- tests/test_interrupted_sync.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/test_interrupted_sync.py b/tests/test_interrupted_sync.py index 508c7cc..741c216 100644 --- a/tests/test_interrupted_sync.py +++ b/tests/test_interrupted_sync.py @@ -200,9 +200,12 @@ def test_run(self): # This is the expected behaviour for shopify as they are using date windowing # TDL-17096 : Resuming bookmark value is getting assigned from execution time # rather than the actual bookmark time for some streams. - # TODO orders and transactions streams are equal, confirm this behavior is correct - if stream == 'transactions' or stream == 'orders': + # TODO transactions stream has equal bookmarks, orders stream has shown both equal + # and greater than bookmark behavior, confirm if this is correct + if stream == 'transactions': self.assertEqual(resuming_bookmark_value, first_bookmark_value) + if stream == 'orders': + self.assertGreaterEqual(resuming_bookmark_value, first_bookmark_value) else: self.assertGreater(resuming_bookmark_value, first_bookmark_value) From 91aef53274950887f065e353f14b93b91bd7cf98 Mon Sep 17 00:00:00 2001 From: btowles Date: Wed, 1 May 2024 19:20:27 +0000 Subject: [PATCH 4/4] Fix if elif else bug --- tests/test_interrupted_sync.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_interrupted_sync.py b/tests/test_interrupted_sync.py index 741c216..d34aff5 100644 --- a/tests/test_interrupted_sync.py +++ b/tests/test_interrupted_sync.py @@ -204,7 +204,7 @@ def test_run(self): # and greater than bookmark behavior, confirm if this is correct if stream == 'transactions': self.assertEqual(resuming_bookmark_value, first_bookmark_value) - if stream == 'orders': + elif stream == 'orders': self.assertGreaterEqual(resuming_bookmark_value, first_bookmark_value) else: self.assertGreater(resuming_bookmark_value, first_bookmark_value)