|
7 | 7 |
|
8 | 8 | from feldera.enums import FaultToleranceModel, PipelineStatus |
9 | 9 | from feldera.runtime_config import RuntimeConfig, Storage |
10 | | -from feldera.testutils import FELDERA_TEST_NUM_HOSTS, FELDERA_TEST_NUM_WORKERS |
| 10 | +from feldera.testutils import ( |
| 11 | + FELDERA_TEST_NUM_HOSTS, |
| 12 | + FELDERA_TEST_NUM_WORKERS, |
| 13 | + single_host_only, |
| 14 | +) |
11 | 15 | from tests import enterprise_only |
12 | 16 | from tests.shared_test_pipeline import SharedTestPipeline |
13 | 17 |
|
@@ -56,6 +60,7 @@ def storage_cfg( |
56 | 60 |
|
57 | 61 | class TestCheckpointSync(SharedTestPipeline): |
58 | 62 | @enterprise_only |
| 63 | + @single_host_only |
59 | 64 | def test_checkpoint_sync( |
60 | 65 | self, |
61 | 66 | from_uuid: bool = False, |
@@ -241,54 +246,66 @@ def test_checkpoint_sync( |
241 | 246 | self.pipeline.clear_storage() |
242 | 247 |
|
243 | 248 | @enterprise_only |
| 249 | + @single_host_only |
244 | 250 | def test_from_uuid(self): |
245 | 251 | self.test_checkpoint_sync(from_uuid=True) |
246 | 252 |
|
247 | 253 | @enterprise_only |
| 254 | + @single_host_only |
248 | 255 | def test_without_clearing_storage(self): |
249 | 256 | self.test_checkpoint_sync(clear_storage=False) |
250 | 257 |
|
251 | 258 | @enterprise_only |
| 259 | + @single_host_only |
252 | 260 | def test_automated_checkpoint(self): |
253 | 261 | self.test_checkpoint_sync(ft_interval=5, automated_checkpoint=True) |
254 | 262 |
|
255 | 263 | @enterprise_only |
| 264 | + @single_host_only |
256 | 265 | def test_automated_checkpoint_sync(self): |
257 | 266 | self.test_checkpoint_sync( |
258 | 267 | ft_interval=5, automated_checkpoint=True, automated_sync_interval=10 |
259 | 268 | ) |
260 | 269 |
|
261 | 270 | @enterprise_only |
| 271 | + @single_host_only |
262 | 272 | def test_automated_checkpoint_sync1(self): |
263 | 273 | self.test_checkpoint_sync(ft_interval=5, automated_sync_interval=10) |
264 | 274 |
|
265 | 275 | @enterprise_only |
| 276 | + @single_host_only |
266 | 277 | def test_autherr_fail(self): |
267 | 278 | with self.assertRaisesRegex(RuntimeError, "SignatureDoesNotMatch|Forbidden"): |
268 | 279 | self.test_checkpoint_sync(auth_err=True, strict=True) |
269 | 280 |
|
270 | 281 | @enterprise_only |
| 282 | + @single_host_only |
271 | 283 | def test_autherr(self): |
272 | 284 | self.test_checkpoint_sync(auth_err=True, strict=False, expect_empty=True) |
273 | 285 |
|
274 | 286 | @enterprise_only |
| 287 | + @single_host_only |
275 | 288 | def test_nonexistent_checkpoint_fail(self): |
276 | 289 | with self.assertRaisesRegex(RuntimeError, "were not found in source"): |
277 | 290 | self.test_checkpoint_sync(random_uuid=True, from_uuid=True, strict=True) |
278 | 291 |
|
279 | 292 | @enterprise_only |
| 293 | + @single_host_only |
280 | 294 | def test_nonexistent_checkpoint(self): |
281 | 295 | self.test_checkpoint_sync(random_uuid=True, from_uuid=True, expect_empty=True) |
282 | 296 |
|
283 | 297 | @enterprise_only |
| 298 | + @single_host_only |
284 | 299 | def test_standby_activation(self): |
285 | 300 | self.test_checkpoint_sync(standby=True) |
286 | 301 |
|
287 | 302 | @enterprise_only |
| 303 | + @single_host_only |
288 | 304 | def test_standby_activation_from_uuid(self): |
289 | 305 | self.test_checkpoint_sync(standby=True, from_uuid=True) |
290 | 306 |
|
291 | 307 | @enterprise_only |
| 308 | + @single_host_only |
292 | 309 | def test_standby_fallback(self, from_uuid: bool = False): |
293 | 310 | # Step 1: Start main pipeline |
294 | 311 | storage_config = storage_cfg(self.pipeline.name) |
@@ -402,5 +419,6 @@ def test_standby_fallback(self, from_uuid: bool = False): |
402 | 419 | self.pipeline.clear_storage() |
403 | 420 |
|
404 | 421 | @enterprise_only |
| 422 | + @single_host_only |
405 | 423 | def test_standby_fallback_from_uuid(self): |
406 | 424 | self.test_standby_fallback(from_uuid=True) |
0 commit comments