diff --git a/dev_utils/dev_utils/test_env.py b/dev_utils/dev_utils/test_env.py index 574aece42..e9cd1d328 100644 --- a/dev_utils/dev_utils/test_env.py +++ b/dev_utils/dev_utils/test_env.py @@ -18,6 +18,7 @@ else: IOTHUB_CONNECTION_STRING = os.environ["IOTHUB_CONNECTION_STRING"] EVENTHUB_CONNECTION_STRING = os.environ.get("EVENTHUB_CONNECTION_STRING") + EVENTHUB_CONSUMER_GROUP = os.getenv("EVENTHUB_CONSUMER_GROUP", None) DEVICE_CONNECTION_STRING = os.environ.get("IOTHUB_DEVICE_CONNECTION_STRING") diff --git a/vsts/python-canary.yaml b/vsts/python-canary.yaml index 750b0995b..8378006e8 100644 --- a/vsts/python-canary.yaml +++ b/vsts/python-canary.yaml @@ -10,27 +10,32 @@ jobs: pv: '3.9' transport: 'mqtt' imageName: 'windows-latest' + consumerGroup: 'cg1' py39_windows_mqttws: pv: '3.9' transport: 'mqttws' imageName: 'windows-latest' - + consumerGroup: 'cg2' py36_linux_mqtt: pv: '3.6' transport: 'mqtt' imageName: 'Ubuntu 20.04' + consumerGroup: 'cg3' py37_linux_mqttws: pv: '3.7' transport: 'mqttws' imageName: 'Ubuntu 20.04' + consumerGroup: 'cg4' py38_linux_mqtt: pv: '3.8' transport: 'mqtt' imageName: 'Ubuntu 20.04' + consumerGroup: 'cg5' py310_linux_mqtt: pv: '3.10' transport: 'mqtt' imageName: 'Ubuntu 20.04' + consumerGroup: 'cg6' pool: vmImage: $(imageName) @@ -46,11 +51,13 @@ jobs: - script: | cd $(Build.SourcesDirectory)/tests/e2e/iothub_e2e + echo "Using consumer group: ${EVENTHUB_CONSUMER_GROUP}" pytest --transport=$(transport) --junitxml=junit/TEST-python-e2e.xml -o junit_suite_name="$(Agent.JobName)" displayName: 'E2E Device Client MQTT Connection String' env: IOTHUB_CONNECTION_STRING: $(IOTHUB-CONNECTION-STRING) EVENTHUB_CONNECTION_STRING: $(EVENTHUB-CONNECTION-STRING) + EVENTHUB_CONSUMER_GROUP: $(consumerGroup) PYTHONUNBUFFERED: True - task: PublishTestResults@2 diff --git a/vsts/python-nightly.yaml b/vsts/python-nightly.yaml index 6107c92be..86f7467ad 100644 --- a/vsts/python-nightly.yaml +++ b/vsts/python-nightly.yaml @@ -10,31 +10,38 @@ jobs: pv: '3.9' transport: 'mqtt' imageName: 'windows-latest' + consumerGroup: 'cg1' py39_windows_mqttws: pv: '3.9' transport: 'mqttws' imageName: 'windows-latest' + consumerGroup: 'cg2' py36_linux_mqtt: pv: '3.6' transport: 'mqtt' imageName: 'Ubuntu 20.04' + consumerGroup: 'cg3' py37_linux_mqttws: pv: '3.7' transport: 'mqttws' imageName: 'Ubuntu 20.04' + consumerGroup: 'cg4' py38_linux_mqtt: pv: '3.8' transport: 'mqtt' imageName: 'Ubuntu 20.04' + consumerGroup: 'cg5' py39_linux_mqttws: pv: '3.9' transport: 'mqttws' imageName: 'Ubuntu 20.04' + consumerGroup: 'cg6' py310_linux_mqtt: pv: '3.10' transport: 'mqtt' imageName: 'Ubuntu 20.04' + consumerGroup: 'cg7' pool: vmImage: $(imageName) @@ -50,13 +57,14 @@ jobs: - script: | cd $(Build.SourcesDirectory)/tests/e2e/iothub_e2e + echo "Using consumer group: ${IOTHUB_E2E_EVENTHUB_CONSUMER_GROUP}" # "not x" means "include all tests that don't have the tag named 'x'", which is everything. pytest --transport=$(transport) --junitxml=junit/TEST-python-e2e.xml -o junit_suite_name="$(Agent.JobName)" -m "not x" displayName: 'E2E Device Client MQTT Connection String' env: IOTHUB_E2E_IOTHUB_CONNECTION_STRING: $(IOTHUB-E2E-CONNECTION-STRING) IOTHUB_E2E_EVENTHUB_CONNECTION_STRING: $(IOTHUB-E2E-EVENTHUB-CONNECTION-STRING) - IOTHUB_E2E_EVENTHUB_CONSUMER_GROUP: e2e-nightly-stress-consumer-group + IOTHUB_E2E_EVENTHUB_CONSUMER_GROUP: $(consumerGroup) PYTHONUNBUFFERED: True - task: PublishTestResults@2