Skip to content

Commit 9c7bbe3

Browse files
authored
chore(integration-tests): add timeout to flaky integration test, increase parallelization (#5521)
Fixes #5439. This PR adds a timeout to the flaky `test_regression_logging_in_context` integration_agent test. Additionally, this PR makes the `integration-agent` test suite parallel to reduce CI duration. ## Checklist - [x] Change(s) are motivated and described in the PR description. - [x] Testing strategy is described if automated tests are not included in the PR. - [x] Risk is outlined (performance impact, potential for breakage, maintainability, etc). - [x] Change is maintainable (easy to change, telemetry, documentation). - [x] [Library release note guidelines](https://ddtrace.readthedocs.io/en/stable/contributing.html#Release-Note-Guidelines) are followed. - [x] Documentation is included (in-code, generated user docs, [public corp docs](https://github.com/DataDog/documentation/)). - [x] PR description includes explicit acknowledgement/acceptance of the performance implications of this PR as reported in the benchmarks PR comment. ## Reviewer Checklist - [x] Title is accurate. - [x] No unnecessary changes are introduced. - [x] Description motivates each change. - [x] Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes unless absolutely necessary. - [x] Testing strategy adequately addresses listed risk(s). - [x] Change is maintainable (easy to change, telemetry, documentation). - [x] Release note makes sense to a user of the library. - [x] Reviewer has explicitly acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment.
1 parent bda528c commit 9c7bbe3

File tree

2 files changed

+12
-14
lines changed

2 files changed

+12
-14
lines changed

.circleci/config.yml

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -538,32 +538,30 @@ jobs:
538538

539539
integration_agent:
540540
<<: *machine_executor
541+
parallelism: 2
541542
steps:
542543
- attach_workspace:
543544
at: .
544545
- checkout
546+
- setup_riot
545547
- start_docker_services:
546548
services: ddagent
547549
- run:
548550
command: |
549551
mv .riot .ddriot
550-
./scripts/ddtest riot -v run --pass-env -s 'integration-latest'
552+
riot list --hash-only 'integration-latest' | shuf | circleci tests split | xargs -n 1 -I {} ./scripts/ddtest riot -v run --pass-env -s {} $( << pipeline.parameters.coverage >>=false; echo '--no-cov' )
553+
- when:
554+
condition:
555+
<< pipeline.parameters.coverage >>
556+
steps:
557+
- save_coverage
551558

552559
integration_testagent:
553560
<<: *machine_executor
554561
steps:
555-
- attach_workspace:
556-
at: .
557-
- checkout
558-
- start_docker_services:
559-
env: SNAPSHOT_CI=1
560-
services: testagent
561-
- run:
562-
environment:
563-
DD_TRACE_AGENT_URL: http://localhost:9126
564-
command: |
565-
mv .riot .ddriot
566-
./scripts/ddtest riot -v run --pass-env -s 'integration-snapshot'
562+
- run_test:
563+
snapshot: true
564+
pattern: 'integration-snapshot'
567565

568566
vendor:
569567
<<: *contrib_job_small

tests/integration/test_integration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,7 @@ def test_regression_logging_in_context(tmpdir, logs_injection, debug_mode, patch
771771
[sys.executable, "test.py"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=str(tmpdir), env=env
772772
)
773773
try:
774-
p.wait(timeout=2)
774+
p.wait(timeout=10)
775775
except TypeError:
776776
# timeout argument added in Python 3.3
777777
p.wait()

0 commit comments

Comments
 (0)