@@ -58,6 +58,8 @@ def test_checkpoint_sync(
5858 strict : bool = False ,
5959 expect_empty : bool = False ,
6060 standby : bool = False ,
61+ ft_interval : int = 60 ,
62+ automated_checkpoint : bool = False ,
6163 ):
6264 """
6365 CREATE TABLE t0 (c0 INT, c1 VARCHAR);
@@ -69,7 +71,8 @@ def test_checkpoint_sync(
6971
7072 self .pipeline .set_runtime_config (
7173 RuntimeConfig (
72- fault_tolerance_model = ft , storage = Storage (config = storage_config )
74+ fault_tolerance_model = ft , storage = Storage (config = storage_config ),
75+ checkpoint_interval_secs = ft_interval ,
7376 )
7477 )
7578 self .pipeline .start ()
@@ -103,7 +106,10 @@ def test_checkpoint_sync(
103106 f"adhoc query returned { len (got_before )} but { processed } records were processed: { got_before } "
104107 )
105108
106- self .pipeline .checkpoint (wait = True )
109+ if not automated_checkpoint :
110+ self .pipeline .checkpoint (wait = True )
111+ else :
112+ time .sleep (ft_interval )
107113 uuid = self .pipeline .sync_checkpoint (wait = True )
108114
109115 self .pipeline .stop (force = True )
@@ -124,7 +130,8 @@ def test_checkpoint_sync(
124130 )
125131 self .pipeline .set_runtime_config (
126132 RuntimeConfig (
127- fault_tolerance_model = ft , storage = Storage (config = storage_config )
133+ fault_tolerance_model = ft , storage = Storage (config = storage_config ),
134+ checkpoint_interval_secs = ft_interval ,
128135 )
129136 )
130137
@@ -177,9 +184,13 @@ def test_from_uuid(self):
177184 def test_without_clearing_storage (self ):
178185 self .test_checkpoint_sync (clear_storage = False )
179186
187+ @enterprise_only
188+ def test_automated_checkpoint (self ):
189+ self .test_checkpoint_sync (ft_interval = 5 , automated_checkpoint = True )
190+
180191 @enterprise_only
181192 def test_autherr_fail (self ):
182- with self .assertRaisesRegex (RuntimeError , "SignatureDoesNotMatch" ):
193+ with self .assertRaisesRegex (RuntimeError , "SignatureDoesNotMatch|Forbidden " ):
183194 self .test_checkpoint_sync (auth_err = True , strict = True )
184195
185196 @enterprise_only
0 commit comments