(self, manager, subtests)
| 1454 | redis_connection.delete(redis_key) |
| 1455 | |
| 1456 | def test_group_children_with_callbacks(self, manager, subtests): |
| 1457 | if not manager.app.conf.result_backend.startswith("redis"): |
| 1458 | raise pytest.skip("Requires redis result backend.") |
| 1459 | redis_connection = get_redis_connection() |
| 1460 | |
| 1461 | redis_key = str(uuid.uuid4()) |
| 1462 | callback = redis_count.si(redis_key=redis_key) |
| 1463 | |
| 1464 | child_task_count = 42 |
| 1465 | child_sig = identity.si(1337) |
| 1466 | child_sig.link(callback) |
| 1467 | group_sig = group(child_sig for _ in range(child_task_count)) |
| 1468 | |
| 1469 | redis_connection.delete(redis_key) |
| 1470 | with subtests.test(msg="Chain executes as expected"): |
| 1471 | res_obj = group_sig() |
| 1472 | assert res_obj.get(timeout=TIMEOUT) == [1337] * child_task_count |
| 1473 | with subtests.test(msg="Chain child task callbacks are called"): |
| 1474 | await_redis_count(child_task_count, redis_key=redis_key) |
| 1475 | redis_connection.delete(redis_key) |
| 1476 | |
| 1477 | def test_group_children_with_errbacks(self, manager, subtests): |
| 1478 | if not manager.app.conf.result_backend.startswith("redis"): |
nothing calls this directly
no test coverage detected