Skip to content
44 changes: 44 additions & 0 deletions .github/workflows/micrometer-stress-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Micrometer FunctionTimer Stress Test

on:
pull_request:
paths:
- 'agent/instrumentation/micrometer-1.0/**'
- '.github/workflows/micrometer-stress-test.yml'
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true

jobs:
stress-test-function-timer:
runs-on: ubuntu-latest
strategy:
matrix:
run: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100]
fail-fast: false
steps:
- uses: actions/checkout@v4

- name: Set up JDK for running Gradle
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4

- name: Run shouldCaptureFunctionTimer test (Run ${{ matrix.run }})
run: >
./gradlew :agent:instrumentation:micrometer-1.0:test
--tests "MicrometerTest.shouldCaptureFunctionTimer"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe the flakiness is related to this test being run along with other tests in the module, so let's try

Suggested change
--tests "MicrometerTest.shouldCaptureFunctionTimer"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed the stress test to run all micrometer-1.0 tests instead of just the specific test. This should better reproduce the flakiness that occurs when tests run together. Commit: 0f13638

--info

- name: Upload test reports on failure
uses: actions/upload-artifact@v4
if: failure()
with:
name: test-reports-run-${{ matrix.run }}
path: '**/build/reports/tests/test/**/*'
Loading