Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add wait strategy for aerospike #6551

Merged
merged 2 commits into from
Jan 15, 2025
Merged

Conversation

kevingosse
Copy link
Collaborator

Summary of changes

In AerospikeFixture, wait until the port 3000 is bound.

Reason for change

The fixture was initializing too quickly, before the aerospike instance was ready to receive requests. This caused random failures.

@kevingosse kevingosse requested a review from a team as a code owner January 15, 2025 13:50
@kevingosse kevingosse added the area:tests unit tests, integration tests label Jan 15, 2025
@andrewlock
Copy link
Member

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing the following branches/commits:

Execution-time benchmarks measure the whole time it takes to execute a program. And are intended to measure the one-off costs. Cases where the execution time results for the PR are worse than latest master results are shown in red. The following thresholds were used for comparing the execution times:

  • Welch test with statistical test for significance of 5%
  • Only results indicating a difference greater than 5% and 5 ms are considered.

Note that these results are based on a single point-in-time result for each branch. For full results, see the dashboard.

Graphs show the p99 interval based on the mean and StdDev of the test run, as well as the mean value of the run (shown as a diamond below the graph).

gantt
    title Execution time (ms) FakeDbCommand (.NET Framework 4.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6551) - mean (69ms)  : 66, 71
     .   : milestone, 69,
    master - mean (68ms)  : 66, 71
     .   : milestone, 68,

    section CallTarget+Inlining+NGEN
    This PR (6551) - mean (979ms)  : 958, 1001
     .   : milestone, 979,
    master - mean (979ms)  : 952, 1005
     .   : milestone, 979,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6551) - mean (107ms)  : 105, 109
     .   : milestone, 107,
    master - mean (107ms)  : 104, 110
     .   : milestone, 107,

    section CallTarget+Inlining+NGEN
    This PR (6551) - mean (682ms)  : 663, 701
     .   : milestone, 682,
    master - mean (677ms)  : 660, 694
     .   : milestone, 677,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6551) - mean (91ms)  : 89, 93
     .   : milestone, 91,
    master - mean (91ms)  : 88, 93
     .   : milestone, 91,

    section CallTarget+Inlining+NGEN
    This PR (6551) - mean (637ms)  : 621, 653
     .   : milestone, 637,
    master - mean (633ms)  : 615, 652
     .   : milestone, 633,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6551) - mean (190ms)  : 186, 194
     .   : milestone, 190,
    master - mean (193ms)  : 189, 197
     .   : milestone, 193,

    section CallTarget+Inlining+NGEN
    This PR (6551) - mean (1,090ms)  : 1055, 1125
     .   : milestone, 1090,
    master - mean (1,097ms)  : 1065, 1130
     .   : milestone, 1097,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6551) - mean (275ms)  : 271, 280
     .   : milestone, 275,
    master - mean (278ms)  : 272, 284
     .   : milestone, 278,

    section CallTarget+Inlining+NGEN
    This PR (6551) - mean (866ms)  : 836, 895
     .   : milestone, 866,
    master - mean (870ms)  : 846, 893
     .   : milestone, 870,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6551) - mean (264ms)  : 259, 269
     .   : milestone, 264,
    master - mean (267ms)  : 263, 271
     .   : milestone, 267,

    section CallTarget+Inlining+NGEN
    This PR (6551) - mean (845ms)  : 819, 871
     .   : milestone, 845,
    master - mean (851ms)  : 818, 883
     .   : milestone, 851,

Loading

@datadog-ddstaging
Copy link

datadog-ddstaging bot commented Jan 15, 2025

Datadog Report

Branch report: kevin/containers_wait_strategy
Commit report: 21aa9a6
Test service: dd-trace-dotnet

✅ 0 Failed, 249863 Passed, 1969 Skipped, 18h 29m 46.9s Total Time

@@ -28,7 +30,8 @@ protected override async Task InitializeResources(Action<string, object> registe
// (6.3.0.5 at time of issue) causes 'Server memory error' and flake
var container = new ContainerBuilder()
.WithImage("aerospike/aerospike-server:6.2.0.6")
.WithPortBinding(3000, true)
.WithPortBinding(AerospikePort, true)
.WithWaitStrategy(Wait.ForUnixContainer().UntilPortIsAvailable(AerospikePort))
Copy link
Member

Choose a reason for hiding this comment

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

Should it actually be this? 🤔

Suggested change
.WithWaitStrategy(Wait.ForUnixContainer().UntilPortIsAvailable(AerospikePort))
.WithWaitStrategy(Wait.ForUnixContainer().UntilPortIsAvailable(Container.GetMappedPublicPort(AerospikePort)))

@kevingosse kevingosse merged commit ab90a2d into master Jan 15, 2025
124 of 127 checks passed
@kevingosse kevingosse deleted the kevin/containers_wait_strategy branch January 15, 2025 16:09
@github-actions github-actions bot added this to the vNext-v3 milestone Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:tests unit tests, integration tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants