@@ -233,7 +233,7 @@ def sync_segments(*_):
233233 assert counts ['splits' ] == 1
234234 assert counts ['segments' ] == 1
235235
236- def test_sync_all_attempts (self , mocker ):
236+ def test_sync_all_split_attempts (self , mocker ):
237237 """Test that 3 attempts are done before failing."""
238238 split_synchronizers = mocker .Mock (spec = SplitSynchronizers )
239239 counts = {'splits' : 0 , 'segments' : 0 }
@@ -249,18 +249,20 @@ def sync_splits(*_):
249249 synchronizer .sync_all ()
250250 assert counts ['splits' ] == 3
251251
252- def test_sync_all_attempts (self , mocker ):
253- """Test that 3 attempts are done before failing ."""
252+ def test_sync_all_segment_attempts (self , mocker ):
253+ """Test that segments don't trigger retries ."""
254254 split_synchronizers = mocker .Mock (spec = SplitSynchronizers )
255255 counts = {'splits' : 0 , 'segments' : 0 }
256+
256257 def sync_segments (* _ ):
257258 """Sync Splits."""
259+
258260 counts ['segments' ] += 1
259- raise Exception ( 'sarasa' )
261+ return False
260262
261263 split_synchronizers .segment_sync .synchronize_segments .side_effect = sync_segments
262264 split_tasks = mocker .Mock (spec = SplitTasks )
263265 synchronizer = Synchronizer (split_synchronizers , split_tasks )
264266
265267 synchronizer .sync_all ()
266- assert counts ['segments' ] == 3
268+ assert counts ['segments' ] == 1
0 commit comments