diff --git a/tests/e2e/provisioning_e2e/pytest.ini b/tests/e2e/provisioning_e2e/pytest.ini index 2243b227d..c64234b41 100644 --- a/tests/e2e/provisioning_e2e/pytest.ini +++ b/tests/e2e/provisioning_e2e/pytest.ini @@ -1,5 +1,5 @@ [pytest] -timeout=30 +timeout=60 testdox_format=plaintext asyncio_mode=auto addopts= diff --git a/tests/e2e/provisioning_e2e/tests/test_async_certificate_enrollments.py b/tests/e2e/provisioning_e2e/tests/test_async_certificate_enrollments.py index 0219af14e..4dd35f695 100644 --- a/tests/e2e/provisioning_e2e/tests/test_async_certificate_enrollments.py +++ b/tests/e2e/provisioning_e2e/tests/test_async_certificate_enrollments.py @@ -28,7 +28,6 @@ delete_directories_certs_created_from_pipeline, ) - logging.basicConfig(level=logging.DEBUG) @@ -53,6 +52,12 @@ "group_intermediate": [3, 4, 5], "group_ca": [6, 7, 8], } +# Allow 40 seconds per serial registration and derive each group limit from its device list. +REGISTRATION_TIMEOUT_PER_DEVICE = 40 + + +def group_registration_timeout(group_type): + return REGISTRATION_TIMEOUT_PER_DEVICE * len(type_to_device_indices[group_type]) @pytest.fixture(scope="module", autouse=True) @@ -133,6 +138,7 @@ async def test_device_register_with_no_device_id_for_a_x509_individual_enrollmen "A group of devices get provisioned to the linked IoTHub with device_ids equal to the individual registration_ids inside a group enrollment that has been created with intermediate X509 authentication" ) @pytest.mark.parametrize("protocol", ["mqtt", "mqttws"]) +@pytest.mark.timeout(group_registration_timeout("group_intermediate")) async def test_group_of_devices_register_with_no_device_id_for_a_x509_intermediate_authentication_group_enrollment( protocol, ): @@ -196,6 +202,7 @@ async def test_group_of_devices_register_with_no_device_id_for_a_x509_intermedia "A group of devices get provisioned to the linked IoTHub with device_ids equal to the individual registration_ids inside a group enrollment that has been created with an already uploaded ca cert X509 authentication" ) @pytest.mark.parametrize("protocol", ["mqtt", "mqttws"]) +@pytest.mark.timeout(group_registration_timeout("group_ca")) async def test_group_of_devices_register_with_no_device_id_for_a_x509_ca_authentication_group_enrollment( protocol, ): diff --git a/tests/e2e/provisioning_e2e/tests/test_sync_certificate_enrollments.py b/tests/e2e/provisioning_e2e/tests/test_sync_certificate_enrollments.py index e8d039e19..96e902eb3 100644 --- a/tests/e2e/provisioning_e2e/tests/test_sync_certificate_enrollments.py +++ b/tests/e2e/provisioning_e2e/tests/test_sync_certificate_enrollments.py @@ -27,7 +27,6 @@ delete_directories_certs_created_from_pipeline, ) - logging.basicConfig(level=logging.DEBUG) @@ -52,6 +51,12 @@ "group_intermediate": [3, 4, 5], "group_ca": [6, 7, 8], } +# Allow 40 seconds per serial registration and derive each group limit from its device list. +REGISTRATION_TIMEOUT_PER_DEVICE = 40 + + +def group_registration_timeout(group_type): + return REGISTRATION_TIMEOUT_PER_DEVICE * len(type_to_device_indices[group_type]) @pytest.fixture(scope="module", autouse=True) @@ -132,6 +137,7 @@ def test_device_register_with_no_device_id_for_a_x509_individual_enrollment(prot "A group of devices get provisioned to the linked IoTHub with device_ids equal to the individual registration_ids inside a group enrollment that has been created with intermediate X509 authentication" ) @pytest.mark.parametrize("protocol", ["mqtt", "mqttws"]) +@pytest.mark.timeout(group_registration_timeout("group_intermediate")) def test_group_of_devices_register_with_no_device_id_for_a_x509_intermediate_authentication_group_enrollment( protocol, ): @@ -196,6 +202,7 @@ def test_group_of_devices_register_with_no_device_id_for_a_x509_intermediate_aut "A group of devices get provisioned to the linked IoTHub with device_ids equal to the individual registration_ids inside a group enrollment that has been created with an already uploaded ca cert X509 authentication" ) @pytest.mark.parametrize("protocol", ["mqtt", "mqttws"]) +@pytest.mark.timeout(group_registration_timeout("group_ca")) def test_group_of_devices_register_with_no_device_id_for_a_x509_ca_authentication_group_enrollment( protocol, ):