From d1f56fb889a3491c8d6850a0c919f379e385e208 Mon Sep 17 00:00:00 2001 From: Evan Roman Date: Sat, 1 Apr 2023 02:46:07 -0500 Subject: [PATCH 01/21] Add back retries on E2E tests --- tests/endtoend/test_eventhub_batch_functions.py | 4 ++++ tests/endtoend/test_eventhub_functions.py | 2 ++ 2 files changed, 6 insertions(+) diff --git a/tests/endtoend/test_eventhub_batch_functions.py b/tests/endtoend/test_eventhub_batch_functions.py index 27fc04fcc..d003e2d8a 100644 --- a/tests/endtoend/test_eventhub_batch_functions.py +++ b/tests/endtoend/test_eventhub_batch_functions.py @@ -22,6 +22,7 @@ class TestEventHubFunctions(testutils.WebHostTestCase): def get_script_dir(cls): return testutils.E2E_TESTS_FOLDER / 'eventhub_batch_functions' + @testutils.retryable_test(3, 5) def test_eventhub_multiple(self): NUM_EVENTS = 3 all_row_keys_seen = dict([(str(i), True) for i in range(NUM_EVENTS)]) @@ -64,6 +65,7 @@ def test_eventhub_multiple(self): finally: self._cleanup(old_partition_key) + @testutils.retryable_test(3, 5) def test_eventhub_multiple_with_metadata(self): # Generate a unique event body for EventHub event # Record the start_time and end_time for checking event enqueue time @@ -163,6 +165,7 @@ def get_script_dir(cls): return testutils.E2E_TESTS_FOLDER / 'eventhub_batch_functions' / \ 'eventhub_batch_functions_stein' + @testutils.retryable_test(3, 5) def test_eventhub_multiple(self): NUM_EVENTS = 3 all_row_keys_seen = dict([(str(i), True) for i in range(NUM_EVENTS)]) @@ -196,6 +199,7 @@ def test_eventhub_multiple(self): self.assertDictEqual(all_row_keys_seen, row_keys_seen) + @testutils.retryable_test(3, 5) def test_eventhub_multiple_with_metadata(self): # Generate a unique event body for EventHub event # Record the start_time and end_time for checking event enqueue time diff --git a/tests/endtoend/test_eventhub_functions.py b/tests/endtoend/test_eventhub_functions.py index dd830b538..d8198eec5 100644 --- a/tests/endtoend/test_eventhub_functions.py +++ b/tests/endtoend/test_eventhub_functions.py @@ -22,6 +22,7 @@ class TestEventHubFunctions(testutils.WebHostTestCase): def get_script_dir(cls): return testutils.E2E_TESTS_FOLDER / 'eventhub_functions' + @testutils.retryable_test(3, 5) def test_eventhub_trigger(self): # Generate a unique event body for the EventHub event data = str(round(time.time())) @@ -46,6 +47,7 @@ def test_eventhub_trigger(self): # Check if the event body matches the initial data self.assertEqual(response, doc) + @testutils.retryable_test(3, 5) def test_eventhub_trigger_with_metadata(self): # Generate a unique event body for EventHub event # Record the start_time and end_time for checking event enqueue time From 8f6e0903ff6c45fb5537f92956e49bd2cf438a79 Mon Sep 17 00:00:00 2001 From: Evan Roman Date: Sat, 1 Apr 2023 04:24:38 -0500 Subject: [PATCH 02/21] Transfer retries to workflow --- .ci/linux_devops_e2e_tests.sh | 2 +- tests/endtoend/test_eventhub_batch_functions.py | 4 ---- tests/endtoend/test_eventhub_functions.py | 2 -- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/.ci/linux_devops_e2e_tests.sh b/.ci/linux_devops_e2e_tests.sh index 7a5d5105e..5d2433667 100644 --- a/.ci/linux_devops_e2e_tests.sh +++ b/.ci/linux_devops_e2e_tests.sh @@ -9,4 +9,4 @@ export AzureWebJobsSqlConnectionString=$LINUXSQLCONNECTIONSTRING export AzureWebJobsEventGridTopicUri=$LINUXEVENTGRIDTOPICURI export AzureWebJobsEventGridConnectionKey=$LINUXEVENTGRIDTOPICCONNECTIONKEY -pytest --instafail --cov=./azure_functions_worker --cov-report xml --cov-branch --cov-append tests/endtoend +pytest -n auto --dist loadfile --reruns 4 -vv --instafail --cov=./azure_functions_worker --cov-report xml --cov-branch --cov-append tests/endtoend diff --git a/tests/endtoend/test_eventhub_batch_functions.py b/tests/endtoend/test_eventhub_batch_functions.py index d003e2d8a..27fc04fcc 100644 --- a/tests/endtoend/test_eventhub_batch_functions.py +++ b/tests/endtoend/test_eventhub_batch_functions.py @@ -22,7 +22,6 @@ class TestEventHubFunctions(testutils.WebHostTestCase): def get_script_dir(cls): return testutils.E2E_TESTS_FOLDER / 'eventhub_batch_functions' - @testutils.retryable_test(3, 5) def test_eventhub_multiple(self): NUM_EVENTS = 3 all_row_keys_seen = dict([(str(i), True) for i in range(NUM_EVENTS)]) @@ -65,7 +64,6 @@ def test_eventhub_multiple(self): finally: self._cleanup(old_partition_key) - @testutils.retryable_test(3, 5) def test_eventhub_multiple_with_metadata(self): # Generate a unique event body for EventHub event # Record the start_time and end_time for checking event enqueue time @@ -165,7 +163,6 @@ def get_script_dir(cls): return testutils.E2E_TESTS_FOLDER / 'eventhub_batch_functions' / \ 'eventhub_batch_functions_stein' - @testutils.retryable_test(3, 5) def test_eventhub_multiple(self): NUM_EVENTS = 3 all_row_keys_seen = dict([(str(i), True) for i in range(NUM_EVENTS)]) @@ -199,7 +196,6 @@ def test_eventhub_multiple(self): self.assertDictEqual(all_row_keys_seen, row_keys_seen) - @testutils.retryable_test(3, 5) def test_eventhub_multiple_with_metadata(self): # Generate a unique event body for EventHub event # Record the start_time and end_time for checking event enqueue time diff --git a/tests/endtoend/test_eventhub_functions.py b/tests/endtoend/test_eventhub_functions.py index d8198eec5..dd830b538 100644 --- a/tests/endtoend/test_eventhub_functions.py +++ b/tests/endtoend/test_eventhub_functions.py @@ -22,7 +22,6 @@ class TestEventHubFunctions(testutils.WebHostTestCase): def get_script_dir(cls): return testutils.E2E_TESTS_FOLDER / 'eventhub_functions' - @testutils.retryable_test(3, 5) def test_eventhub_trigger(self): # Generate a unique event body for the EventHub event data = str(round(time.time())) @@ -47,7 +46,6 @@ def test_eventhub_trigger(self): # Check if the event body matches the initial data self.assertEqual(response, doc) - @testutils.retryable_test(3, 5) def test_eventhub_trigger_with_metadata(self): # Generate a unique event body for EventHub event # Record the start_time and end_time for checking event enqueue time From 1ea5966798ead46a78c3a8994e6fbb09edc308f2 Mon Sep 17 00:00:00 2001 From: Evan Roman Date: Sat, 1 Apr 2023 15:43:18 -0500 Subject: [PATCH 03/21] Add reruns to start-e2e --- .ci/e2e_integration_test/start-e2e.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/e2e_integration_test/start-e2e.ps1 b/.ci/e2e_integration_test/start-e2e.ps1 index 450484be4..5ab7b3e78 100644 --- a/.ci/e2e_integration_test/start-e2e.ps1 +++ b/.ci/e2e_integration_test/start-e2e.ps1 @@ -97,5 +97,5 @@ Write-Host "-------------------------------------------------------------------- Write-Host "Running E2E integration tests..." -ForegroundColor Green Write-Host "-----------------------------------------------------------------------------`n" -ForegroundColor Green $env:CORE_TOOLS_EXE_PATH = "$funcExePath" -pytest --junitxml=e2e-integration-test-report.xml --cov=./azure_functions_worker --cov-branch --cov-append tests/endtoend --cov-report xml --cov-report html +pytest --junitxml=e2e-integration-test-report.xml --reruns 4 --cov=./azure_functions_worker --cov-branch --cov-append tests/endtoend --cov-report xml --cov-report html Write-Host "-----------------------------------------------------------------------------`n" -ForegroundColor Green From d0d2745c68037d36291005e6651c357b8fd52a6f Mon Sep 17 00:00:00 2001 From: Evan Roman Date: Sun, 2 Apr 2023 00:52:30 -0500 Subject: [PATCH 04/21] Change pytest cmd back to original --- .ci/linux_devops_e2e_tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/linux_devops_e2e_tests.sh b/.ci/linux_devops_e2e_tests.sh index 5d2433667..a17ac7fdd 100644 --- a/.ci/linux_devops_e2e_tests.sh +++ b/.ci/linux_devops_e2e_tests.sh @@ -9,4 +9,4 @@ export AzureWebJobsSqlConnectionString=$LINUXSQLCONNECTIONSTRING export AzureWebJobsEventGridTopicUri=$LINUXEVENTGRIDTOPICURI export AzureWebJobsEventGridConnectionKey=$LINUXEVENTGRIDTOPICCONNECTIONKEY -pytest -n auto --dist loadfile --reruns 4 -vv --instafail --cov=./azure_functions_worker --cov-report xml --cov-branch --cov-append tests/endtoend +pytest --instafail --cov=./azure_functions_worker --cov-report xml --cov-branch --cov-append tests/endtoend \ No newline at end of file From 4554e6b21f9d489269a8602d1e672bcdbe9996d6 Mon Sep 17 00:00:00 2001 From: Evan Roman Date: Sun, 2 Apr 2023 00:57:27 -0500 Subject: [PATCH 05/21] Add newline at end of file --- .ci/linux_devops_e2e_tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/linux_devops_e2e_tests.sh b/.ci/linux_devops_e2e_tests.sh index a17ac7fdd..7a5d5105e 100644 --- a/.ci/linux_devops_e2e_tests.sh +++ b/.ci/linux_devops_e2e_tests.sh @@ -9,4 +9,4 @@ export AzureWebJobsSqlConnectionString=$LINUXSQLCONNECTIONSTRING export AzureWebJobsEventGridTopicUri=$LINUXEVENTGRIDTOPICURI export AzureWebJobsEventGridConnectionKey=$LINUXEVENTGRIDTOPICCONNECTIONKEY -pytest --instafail --cov=./azure_functions_worker --cov-report xml --cov-branch --cov-append tests/endtoend \ No newline at end of file +pytest --instafail --cov=./azure_functions_worker --cov-report xml --cov-branch --cov-append tests/endtoend From 5afa5afe384835a5f4d14feb4d98a8f19577d65b Mon Sep 17 00:00:00 2001 From: Evan <66287338+EvanR-Dev@users.noreply.github.com> Date: Thu, 6 Apr 2023 14:18:22 -0500 Subject: [PATCH 06/21] Clean code coverage --- .ci/e2e_integration_test/pipeline.yml | 4 ++++ .ci/e2e_integration_test/start-e2e.ps1 | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.ci/e2e_integration_test/pipeline.yml b/.ci/e2e_integration_test/pipeline.yml index e8a34909b..5f8e8f25f 100644 --- a/.ci/e2e_integration_test/pipeline.yml +++ b/.ci/e2e_integration_test/pipeline.yml @@ -48,3 +48,7 @@ steps: testResultsFiles: 'e2e-integration-test-report.xml' testRunTitle: 'Publish Python Worker E2E Test Result' failTaskOnFailedTests: true +- task: PublishCodeCoverageResults@2 + displayName: 'Generate Code Coverage XML file' + inputs: + summaryFileLocation: coverage.xml \ No newline at end of file diff --git a/.ci/e2e_integration_test/start-e2e.ps1 b/.ci/e2e_integration_test/start-e2e.ps1 index 5ab7b3e78..bce329877 100644 --- a/.ci/e2e_integration_test/start-e2e.ps1 +++ b/.ci/e2e_integration_test/start-e2e.ps1 @@ -97,5 +97,5 @@ Write-Host "-------------------------------------------------------------------- Write-Host "Running E2E integration tests..." -ForegroundColor Green Write-Host "-----------------------------------------------------------------------------`n" -ForegroundColor Green $env:CORE_TOOLS_EXE_PATH = "$funcExePath" -pytest --junitxml=e2e-integration-test-report.xml --reruns 4 --cov=./azure_functions_worker --cov-branch --cov-append tests/endtoend --cov-report xml --cov-report html +pytest --junitxml=e2e-integration-test-report.xml --reruns 4 tests/endtoend Write-Host "-----------------------------------------------------------------------------`n" -ForegroundColor Green From a0b8770d7edd7b6054c5deab0598eea0c436c85d Mon Sep 17 00:00:00 2001 From: Evan <66287338+EvanR-Dev@users.noreply.github.com> Date: Fri, 7 Apr 2023 00:13:42 -0500 Subject: [PATCH 07/21] Adjust coverage for E2E tests --- .ci/e2e_integration_test/pipeline.yml | 3 ++- .ci/e2e_integration_test/start-e2e.ps1 | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.ci/e2e_integration_test/pipeline.yml b/.ci/e2e_integration_test/pipeline.yml index 5f8e8f25f..7e5730e1c 100644 --- a/.ci/e2e_integration_test/pipeline.yml +++ b/.ci/e2e_integration_test/pipeline.yml @@ -49,6 +49,7 @@ steps: testRunTitle: 'Publish Python Worker E2E Test Result' failTaskOnFailedTests: true - task: PublishCodeCoverageResults@2 - displayName: 'Generate Code Coverage XML file' + displayName: 'Publish Code Coverage XML Result' + condition: succeededOrFailed() inputs: summaryFileLocation: coverage.xml \ No newline at end of file diff --git a/.ci/e2e_integration_test/start-e2e.ps1 b/.ci/e2e_integration_test/start-e2e.ps1 index bce329877..468580d1d 100644 --- a/.ci/e2e_integration_test/start-e2e.ps1 +++ b/.ci/e2e_integration_test/start-e2e.ps1 @@ -97,5 +97,5 @@ Write-Host "-------------------------------------------------------------------- Write-Host "Running E2E integration tests..." -ForegroundColor Green Write-Host "-----------------------------------------------------------------------------`n" -ForegroundColor Green $env:CORE_TOOLS_EXE_PATH = "$funcExePath" -pytest --junitxml=e2e-integration-test-report.xml --reruns 4 tests/endtoend +pytest --junitxml=e2e-integration-test-report.xml --reruns 4 --cov=./azure_functions_worker --cov-branch --cov-append tests/endtoend --cov-report xml:coverage.xml Write-Host "-----------------------------------------------------------------------------`n" -ForegroundColor Green From 229c0e6ce60157546b0a9d5c93d2da49ad3f0426 Mon Sep 17 00:00:00 2001 From: Evan <66287338+EvanR-Dev@users.noreply.github.com> Date: Fri, 7 Apr 2023 01:05:39 -0500 Subject: [PATCH 08/21] Try previous PublishCodeCoverageResults --- .ci/e2e_integration_test/pipeline.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.ci/e2e_integration_test/pipeline.yml b/.ci/e2e_integration_test/pipeline.yml index 7e5730e1c..d7eaed722 100644 --- a/.ci/e2e_integration_test/pipeline.yml +++ b/.ci/e2e_integration_test/pipeline.yml @@ -48,8 +48,9 @@ steps: testResultsFiles: 'e2e-integration-test-report.xml' testRunTitle: 'Publish Python Worker E2E Test Result' failTaskOnFailedTests: true -- task: PublishCodeCoverageResults@2 +- task: PublishCodeCoverageResults@1 displayName: 'Publish Code Coverage XML Result' condition: succeededOrFailed() inputs: + codeCoverageTool: cobertura summaryFileLocation: coverage.xml \ No newline at end of file From 33d5a8ab671368b4c16512b217c1b064c56421e2 Mon Sep 17 00:00:00 2001 From: Evan Roman Date: Fri, 7 Apr 2023 13:59:21 -0500 Subject: [PATCH 09/21] Remove cov append --- .ci/e2e_integration_test/start-e2e.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/e2e_integration_test/start-e2e.ps1 b/.ci/e2e_integration_test/start-e2e.ps1 index 468580d1d..2b4afad21 100644 --- a/.ci/e2e_integration_test/start-e2e.ps1 +++ b/.ci/e2e_integration_test/start-e2e.ps1 @@ -97,5 +97,5 @@ Write-Host "-------------------------------------------------------------------- Write-Host "Running E2E integration tests..." -ForegroundColor Green Write-Host "-----------------------------------------------------------------------------`n" -ForegroundColor Green $env:CORE_TOOLS_EXE_PATH = "$funcExePath" -pytest --junitxml=e2e-integration-test-report.xml --reruns 4 --cov=./azure_functions_worker --cov-branch --cov-append tests/endtoend --cov-report xml:coverage.xml +pytest --junitxml=e2e-integration-test-report.xml --reruns 4 --cov=./azure_functions_worker --cov-branch tests/endtoend --cov-report xml:coverage.xml Write-Host "-----------------------------------------------------------------------------`n" -ForegroundColor Green From c5d7a9a332efb3e3888b0696bd56c4ea4cff391c Mon Sep 17 00:00:00 2001 From: Evan Roman Date: Fri, 7 Apr 2023 14:52:19 -0500 Subject: [PATCH 10/21] Add cov generation script --- .ci/e2e_integration_test/pipeline.yml | 5 ++++- .ci/linux_devops_code_coverage_generate.sh | 7 +++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 .ci/linux_devops_code_coverage_generate.sh diff --git a/.ci/e2e_integration_test/pipeline.yml b/.ci/e2e_integration_test/pipeline.yml index d7eaed722..90b59c5eb 100644 --- a/.ci/e2e_integration_test/pipeline.yml +++ b/.ci/e2e_integration_test/pipeline.yml @@ -48,8 +48,11 @@ steps: testResultsFiles: 'e2e-integration-test-report.xml' testRunTitle: 'Publish Python Worker E2E Test Result' failTaskOnFailedTests: true +- bash: | + chmod +x ../linux_devops_code_coverage_generate.sh + ../linux_devops_code_coverage_generate.sh - task: PublishCodeCoverageResults@1 - displayName: 'Publish Code Coverage XML Result' + displayName: 'Publish Code Coverage Result' condition: succeededOrFailed() inputs: codeCoverageTool: cobertura diff --git a/.ci/linux_devops_code_coverage_generate.sh b/.ci/linux_devops_code_coverage_generate.sh new file mode 100644 index 000000000..d5425b786 --- /dev/null +++ b/.ci/linux_devops_code_coverage_generate.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +set -e -x + +coverage combine +coverage xml +coverage erase \ No newline at end of file From 9ecaccf43be473f561ff8b9f0bf6daa875087ac7 Mon Sep 17 00:00:00 2001 From: Evan Roman Date: Sat, 8 Apr 2023 01:19:00 -0500 Subject: [PATCH 11/21] Add path sources --- .ci/e2e_integration_test/pipeline.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.ci/e2e_integration_test/pipeline.yml b/.ci/e2e_integration_test/pipeline.yml index 90b59c5eb..68584f4bb 100644 --- a/.ci/e2e_integration_test/pipeline.yml +++ b/.ci/e2e_integration_test/pipeline.yml @@ -56,4 +56,5 @@ steps: condition: succeededOrFailed() inputs: codeCoverageTool: cobertura - summaryFileLocation: coverage.xml \ No newline at end of file + summaryFileLocation: coverage.xml + pathToSources: '$(Build.SourcesDirectory)/azure_functions_worker' \ No newline at end of file From cf3f5d6161f8b8decfd5579118f4e55ff6708217 Mon Sep 17 00:00:00 2001 From: Evan Roman Date: Sat, 8 Apr 2023 02:12:38 -0500 Subject: [PATCH 12/21] Adjust bash cmd --- .ci/e2e_integration_test/pipeline.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.ci/e2e_integration_test/pipeline.yml b/.ci/e2e_integration_test/pipeline.yml index 68584f4bb..f4cbbd80b 100644 --- a/.ci/e2e_integration_test/pipeline.yml +++ b/.ci/e2e_integration_test/pipeline.yml @@ -49,12 +49,12 @@ steps: testRunTitle: 'Publish Python Worker E2E Test Result' failTaskOnFailedTests: true - bash: | - chmod +x ../linux_devops_code_coverage_generate.sh - ../linux_devops_code_coverage_generate.sh + chmod +x $(Build.SourcesDirectory)/.ci/linux_devops_code_coverage_generate.sh + $(Build.SourcesDirectory)/.ci/linux_devops_code_coverage_generate.sh - task: PublishCodeCoverageResults@1 displayName: 'Publish Code Coverage Result' - condition: succeededOrFailed() +# condition: succeededOrFailed() inputs: codeCoverageTool: cobertura summaryFileLocation: coverage.xml - pathToSources: '$(Build.SourcesDirectory)/azure_functions_worker' \ No newline at end of file +# pathToSources: '$(Build.SourcesDirectory)/azure_functions_worker' \ No newline at end of file From b50fb0bd3d9f9a50391633527998f96c5acb3179 Mon Sep 17 00:00:00 2001 From: Evan Roman Date: Sat, 8 Apr 2023 02:53:35 -0500 Subject: [PATCH 13/21] Add append --- .ci/e2e_integration_test/pipeline.yml | 2 +- .ci/e2e_integration_test/start-e2e.ps1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.ci/e2e_integration_test/pipeline.yml b/.ci/e2e_integration_test/pipeline.yml index f4cbbd80b..199c8997b 100644 --- a/.ci/e2e_integration_test/pipeline.yml +++ b/.ci/e2e_integration_test/pipeline.yml @@ -53,7 +53,7 @@ steps: $(Build.SourcesDirectory)/.ci/linux_devops_code_coverage_generate.sh - task: PublishCodeCoverageResults@1 displayName: 'Publish Code Coverage Result' -# condition: succeededOrFailed() + condition: succeededOrFailed() inputs: codeCoverageTool: cobertura summaryFileLocation: coverage.xml diff --git a/.ci/e2e_integration_test/start-e2e.ps1 b/.ci/e2e_integration_test/start-e2e.ps1 index 2b4afad21..468580d1d 100644 --- a/.ci/e2e_integration_test/start-e2e.ps1 +++ b/.ci/e2e_integration_test/start-e2e.ps1 @@ -97,5 +97,5 @@ Write-Host "-------------------------------------------------------------------- Write-Host "Running E2E integration tests..." -ForegroundColor Green Write-Host "-----------------------------------------------------------------------------`n" -ForegroundColor Green $env:CORE_TOOLS_EXE_PATH = "$funcExePath" -pytest --junitxml=e2e-integration-test-report.xml --reruns 4 --cov=./azure_functions_worker --cov-branch tests/endtoend --cov-report xml:coverage.xml +pytest --junitxml=e2e-integration-test-report.xml --reruns 4 --cov=./azure_functions_worker --cov-branch --cov-append tests/endtoend --cov-report xml:coverage.xml Write-Host "-----------------------------------------------------------------------------`n" -ForegroundColor Green From aef59332d6e85dba023c0d44c4b14bd71ce0dc17 Mon Sep 17 00:00:00 2001 From: Evan Roman Date: Sat, 8 Apr 2023 03:35:39 -0500 Subject: [PATCH 14/21] Experiment with coverage --- .ci/e2e_integration_test/start-e2e.ps1 | 2 +- .ci/linux_devops_e2e_tests.sh | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.ci/e2e_integration_test/start-e2e.ps1 b/.ci/e2e_integration_test/start-e2e.ps1 index 468580d1d..33b068193 100644 --- a/.ci/e2e_integration_test/start-e2e.ps1 +++ b/.ci/e2e_integration_test/start-e2e.ps1 @@ -97,5 +97,5 @@ Write-Host "-------------------------------------------------------------------- Write-Host "Running E2E integration tests..." -ForegroundColor Green Write-Host "-----------------------------------------------------------------------------`n" -ForegroundColor Green $env:CORE_TOOLS_EXE_PATH = "$funcExePath" -pytest --junitxml=e2e-integration-test-report.xml --reruns 4 --cov=./azure_functions_worker --cov-branch --cov-append tests/endtoend --cov-report xml:coverage.xml +pytest --junitxml=e2e-integration-test-report.xml --reruns 4 #--cov=./azure_functions_worker --cov-branch --cov-append tests/endtoend --cov-report xml:coverage.xml Write-Host "-----------------------------------------------------------------------------`n" -ForegroundColor Green diff --git a/.ci/linux_devops_e2e_tests.sh b/.ci/linux_devops_e2e_tests.sh index 7a5d5105e..7dc911aaa 100644 --- a/.ci/linux_devops_e2e_tests.sh +++ b/.ci/linux_devops_e2e_tests.sh @@ -9,4 +9,5 @@ export AzureWebJobsSqlConnectionString=$LINUXSQLCONNECTIONSTRING export AzureWebJobsEventGridTopicUri=$LINUXEVENTGRIDTOPICURI export AzureWebJobsEventGridConnectionKey=$LINUXEVENTGRIDTOPICCONNECTIONKEY -pytest --instafail --cov=./azure_functions_worker --cov-report xml --cov-branch --cov-append tests/endtoend +coverage run -p --branch -m pytest tests/endtoend +#pytest --instafail --cov=./azure_functions_worker --cov-report xml --cov-branch --cov-append tests/endtoend From 0fc708bcf6f11b2909be632e69a0a33590a8d1b1 Mon Sep 17 00:00:00 2001 From: Evan Roman Date: Sat, 8 Apr 2023 12:37:30 -0500 Subject: [PATCH 15/21] Change ps1 --- .ci/e2e_integration_test/start-e2e.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/e2e_integration_test/start-e2e.ps1 b/.ci/e2e_integration_test/start-e2e.ps1 index 33b068193..32c34db86 100644 --- a/.ci/e2e_integration_test/start-e2e.ps1 +++ b/.ci/e2e_integration_test/start-e2e.ps1 @@ -97,5 +97,5 @@ Write-Host "-------------------------------------------------------------------- Write-Host "Running E2E integration tests..." -ForegroundColor Green Write-Host "-----------------------------------------------------------------------------`n" -ForegroundColor Green $env:CORE_TOOLS_EXE_PATH = "$funcExePath" -pytest --junitxml=e2e-integration-test-report.xml --reruns 4 #--cov=./azure_functions_worker --cov-branch --cov-append tests/endtoend --cov-report xml:coverage.xml +pytest --junitxml=e2e-integration-test-report.xml --reruns 4 tests/endtoend #--cov=./azure_functions_worker --cov-branch --cov-append tests/endtoend --cov-report xml:coverage.xml Write-Host "-----------------------------------------------------------------------------`n" -ForegroundColor Green From 4bb5f5feb4ee6adc9ef72a4794837df4ce0ac4ee Mon Sep 17 00:00:00 2001 From: Evan Roman Date: Sat, 8 Apr 2023 13:22:22 -0500 Subject: [PATCH 16/21] Retry --- .ci/e2e_integration_test/pipeline.yml | 2 +- .ci/e2e_integration_test/start-e2e.ps1 | 2 +- .ci/linux_devops_e2e_tests.sh | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.ci/e2e_integration_test/pipeline.yml b/.ci/e2e_integration_test/pipeline.yml index 199c8997b..1c3d49bcc 100644 --- a/.ci/e2e_integration_test/pipeline.yml +++ b/.ci/e2e_integration_test/pipeline.yml @@ -57,4 +57,4 @@ steps: inputs: codeCoverageTool: cobertura summaryFileLocation: coverage.xml -# pathToSources: '$(Build.SourcesDirectory)/azure_functions_worker' \ No newline at end of file + pathToSources: '$(Build.SourcesDirectory)/azure_functions_worker' \ No newline at end of file diff --git a/.ci/e2e_integration_test/start-e2e.ps1 b/.ci/e2e_integration_test/start-e2e.ps1 index 32c34db86..f41716970 100644 --- a/.ci/e2e_integration_test/start-e2e.ps1 +++ b/.ci/e2e_integration_test/start-e2e.ps1 @@ -97,5 +97,5 @@ Write-Host "-------------------------------------------------------------------- Write-Host "Running E2E integration tests..." -ForegroundColor Green Write-Host "-----------------------------------------------------------------------------`n" -ForegroundColor Green $env:CORE_TOOLS_EXE_PATH = "$funcExePath" -pytest --junitxml=e2e-integration-test-report.xml --reruns 4 tests/endtoend #--cov=./azure_functions_worker --cov-branch --cov-append tests/endtoend --cov-report xml:coverage.xml +pytest --junitxml=e2e-integration-test-report.xml --reruns 4 --cov=./azure_functions_worker --cov-branch --cov-append tests/endtoend --cov-report xml Write-Host "-----------------------------------------------------------------------------`n" -ForegroundColor Green diff --git a/.ci/linux_devops_e2e_tests.sh b/.ci/linux_devops_e2e_tests.sh index 7dc911aaa..7a5d5105e 100644 --- a/.ci/linux_devops_e2e_tests.sh +++ b/.ci/linux_devops_e2e_tests.sh @@ -9,5 +9,4 @@ export AzureWebJobsSqlConnectionString=$LINUXSQLCONNECTIONSTRING export AzureWebJobsEventGridTopicUri=$LINUXEVENTGRIDTOPICURI export AzureWebJobsEventGridConnectionKey=$LINUXEVENTGRIDTOPICCONNECTIONKEY -coverage run -p --branch -m pytest tests/endtoend -#pytest --instafail --cov=./azure_functions_worker --cov-report xml --cov-branch --cov-append tests/endtoend +pytest --instafail --cov=./azure_functions_worker --cov-report xml --cov-branch --cov-append tests/endtoend From 8d4a81fe939207613c632edd6fe0e4bf968264d3 Mon Sep 17 00:00:00 2001 From: Evan Roman Date: Sat, 8 Apr 2023 14:00:32 -0500 Subject: [PATCH 17/21] Experiment --- .ci/e2e_integration_test/pipeline.yml | 6 +++--- .ci/e2e_integration_test/start-e2e.ps1 | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.ci/e2e_integration_test/pipeline.yml b/.ci/e2e_integration_test/pipeline.yml index 1c3d49bcc..4e69ffd28 100644 --- a/.ci/e2e_integration_test/pipeline.yml +++ b/.ci/e2e_integration_test/pipeline.yml @@ -55,6 +55,6 @@ steps: displayName: 'Publish Code Coverage Result' condition: succeededOrFailed() inputs: - codeCoverageTool: cobertura - summaryFileLocation: coverage.xml - pathToSources: '$(Build.SourcesDirectory)/azure_functions_worker' \ No newline at end of file + codeCoverageTool: 'JaCoCo' + summaryFileLocation: 'coverage.xml' +# pathToSources: '$(Build.SourcesDirectory)/azure_functions_worker' \ No newline at end of file diff --git a/.ci/e2e_integration_test/start-e2e.ps1 b/.ci/e2e_integration_test/start-e2e.ps1 index f41716970..d9729f994 100644 --- a/.ci/e2e_integration_test/start-e2e.ps1 +++ b/.ci/e2e_integration_test/start-e2e.ps1 @@ -97,5 +97,5 @@ Write-Host "-------------------------------------------------------------------- Write-Host "Running E2E integration tests..." -ForegroundColor Green Write-Host "-----------------------------------------------------------------------------`n" -ForegroundColor Green $env:CORE_TOOLS_EXE_PATH = "$funcExePath" -pytest --junitxml=e2e-integration-test-report.xml --reruns 4 --cov=./azure_functions_worker --cov-branch --cov-append tests/endtoend --cov-report xml +pytest --junitxml=e2e-integration-test-report.xml --reruns 4 --cov=. --cov-branch --cov-append tests/endtoend --cov-report xml Write-Host "-----------------------------------------------------------------------------`n" -ForegroundColor Green From 936147620af654af26625a896e3f681600120d1b Mon Sep 17 00:00:00 2001 From: Evan Roman Date: Sat, 8 Apr 2023 14:38:32 -0500 Subject: [PATCH 18/21] Add coverage cmd with cov plugin test --- .ci/e2e_integration_test/pipeline.yml | 4 ++-- .ci/e2e_integration_test/start-e2e.ps1 | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.ci/e2e_integration_test/pipeline.yml b/.ci/e2e_integration_test/pipeline.yml index 4e69ffd28..199c8997b 100644 --- a/.ci/e2e_integration_test/pipeline.yml +++ b/.ci/e2e_integration_test/pipeline.yml @@ -55,6 +55,6 @@ steps: displayName: 'Publish Code Coverage Result' condition: succeededOrFailed() inputs: - codeCoverageTool: 'JaCoCo' - summaryFileLocation: 'coverage.xml' + codeCoverageTool: cobertura + summaryFileLocation: coverage.xml # pathToSources: '$(Build.SourcesDirectory)/azure_functions_worker' \ No newline at end of file diff --git a/.ci/e2e_integration_test/start-e2e.ps1 b/.ci/e2e_integration_test/start-e2e.ps1 index d9729f994..16373df98 100644 --- a/.ci/e2e_integration_test/start-e2e.ps1 +++ b/.ci/e2e_integration_test/start-e2e.ps1 @@ -97,5 +97,5 @@ Write-Host "-------------------------------------------------------------------- Write-Host "Running E2E integration tests..." -ForegroundColor Green Write-Host "-----------------------------------------------------------------------------`n" -ForegroundColor Green $env:CORE_TOOLS_EXE_PATH = "$funcExePath" -pytest --junitxml=e2e-integration-test-report.xml --reruns 4 --cov=. --cov-branch --cov-append tests/endtoend --cov-report xml +coverage run -m pytest --junitxml=e2e-integration-test-report.xml --reruns 4 --cov=./azure_functions_worker --cov-branch --cov-append tests/endtoend --cov-report xml Write-Host "-----------------------------------------------------------------------------`n" -ForegroundColor Green From 2868e8f04e5cfd378b2481f3bd86ed31c48497f4 Mon Sep 17 00:00:00 2001 From: Evan Roman Date: Sat, 8 Apr 2023 17:01:50 -0500 Subject: [PATCH 19/21] Remove codecov --- .ci/e2e_integration_test/start-e2e.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/e2e_integration_test/start-e2e.ps1 b/.ci/e2e_integration_test/start-e2e.ps1 index 16373df98..d2d6b9fcc 100644 --- a/.ci/e2e_integration_test/start-e2e.ps1 +++ b/.ci/e2e_integration_test/start-e2e.ps1 @@ -97,5 +97,5 @@ Write-Host "-------------------------------------------------------------------- Write-Host "Running E2E integration tests..." -ForegroundColor Green Write-Host "-----------------------------------------------------------------------------`n" -ForegroundColor Green $env:CORE_TOOLS_EXE_PATH = "$funcExePath" -coverage run -m pytest --junitxml=e2e-integration-test-report.xml --reruns 4 --cov=./azure_functions_worker --cov-branch --cov-append tests/endtoend --cov-report xml +coverage run -m pytest --junitxml=e2e-integration-test-report.xml --reruns 4 tests/endtoend Write-Host "-----------------------------------------------------------------------------`n" -ForegroundColor Green From 469da4429dcb1867fff209694c71a967b97110c1 Mon Sep 17 00:00:00 2001 From: Evan <66287338+EvanR-Dev@users.noreply.github.com> Date: Tue, 11 Apr 2023 12:10:34 -0500 Subject: [PATCH 20/21] Remove code coverage from E2E tests entirely --- .ci/e2e_integration_test/pipeline.yml | 12 +----------- .ci/e2e_integration_test/start-e2e.ps1 | 2 +- .ci/linux_devops_code_coverage_generate.sh | 7 ------- 3 files changed, 2 insertions(+), 19 deletions(-) delete mode 100644 .ci/linux_devops_code_coverage_generate.sh diff --git a/.ci/e2e_integration_test/pipeline.yml b/.ci/e2e_integration_test/pipeline.yml index 199c8997b..5fb38eb8f 100644 --- a/.ci/e2e_integration_test/pipeline.yml +++ b/.ci/e2e_integration_test/pipeline.yml @@ -47,14 +47,4 @@ steps: inputs: testResultsFiles: 'e2e-integration-test-report.xml' testRunTitle: 'Publish Python Worker E2E Test Result' - failTaskOnFailedTests: true -- bash: | - chmod +x $(Build.SourcesDirectory)/.ci/linux_devops_code_coverage_generate.sh - $(Build.SourcesDirectory)/.ci/linux_devops_code_coverage_generate.sh -- task: PublishCodeCoverageResults@1 - displayName: 'Publish Code Coverage Result' - condition: succeededOrFailed() - inputs: - codeCoverageTool: cobertura - summaryFileLocation: coverage.xml -# pathToSources: '$(Build.SourcesDirectory)/azure_functions_worker' \ No newline at end of file + failTaskOnFailedTests: true \ No newline at end of file diff --git a/.ci/e2e_integration_test/start-e2e.ps1 b/.ci/e2e_integration_test/start-e2e.ps1 index d2d6b9fcc..bce329877 100644 --- a/.ci/e2e_integration_test/start-e2e.ps1 +++ b/.ci/e2e_integration_test/start-e2e.ps1 @@ -97,5 +97,5 @@ Write-Host "-------------------------------------------------------------------- Write-Host "Running E2E integration tests..." -ForegroundColor Green Write-Host "-----------------------------------------------------------------------------`n" -ForegroundColor Green $env:CORE_TOOLS_EXE_PATH = "$funcExePath" -coverage run -m pytest --junitxml=e2e-integration-test-report.xml --reruns 4 tests/endtoend +pytest --junitxml=e2e-integration-test-report.xml --reruns 4 tests/endtoend Write-Host "-----------------------------------------------------------------------------`n" -ForegroundColor Green diff --git a/.ci/linux_devops_code_coverage_generate.sh b/.ci/linux_devops_code_coverage_generate.sh deleted file mode 100644 index d5425b786..000000000 --- a/.ci/linux_devops_code_coverage_generate.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -set -e -x - -coverage combine -coverage xml -coverage erase \ No newline at end of file From de94774a471ca542476e16ed3260ad1718d46dc6 Mon Sep 17 00:00:00 2001 From: Evan <66287338+EvanR-Dev@users.noreply.github.com> Date: Tue, 11 Apr 2023 12:12:57 -0500 Subject: [PATCH 21/21] Add newline --- .ci/e2e_integration_test/pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/e2e_integration_test/pipeline.yml b/.ci/e2e_integration_test/pipeline.yml index 5fb38eb8f..e8a34909b 100644 --- a/.ci/e2e_integration_test/pipeline.yml +++ b/.ci/e2e_integration_test/pipeline.yml @@ -47,4 +47,4 @@ steps: inputs: testResultsFiles: 'e2e-integration-test-report.xml' testRunTitle: 'Publish Python Worker E2E Test Result' - failTaskOnFailedTests: true \ No newline at end of file + failTaskOnFailedTests: true