Skip to content

Commit

Permalink
Skip format on Windows due to flakiness
Browse files Browse the repository at this point in the history
  • Loading branch information
stevejgordon committed Dec 5, 2024
1 parent b47e2a1 commit 215e1ea
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 26 deletions.
1 change: 0 additions & 1 deletion .github/workflows/test-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ jobs:
runs-on: ubuntu-latest
needs: [ 'format' ]
timeout-minutes: 30

steps:
- uses: actions/checkout@v4
- name: Bootstrap Action Workspace
Expand Down
29 changes: 13 additions & 16 deletions .github/workflows/test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,19 @@ env:

jobs:

format:
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
- name: Bootstrap Action Workspace
uses: ./.github/workflows/bootstrap
- name: Format
run: ./build.bat format
# format:
# runs-on: windows-2022
# steps:
# - uses: actions/checkout@v4
# - name: Bootstrap Action Workspace
# uses: ./.github/workflows/bootstrap
# - name: Format
# run: ./build.bat format

#required step
tests:
runs-on: windows-2022
needs: [ 'format' ]
timeout-minutes: 30

steps:
- uses: actions/checkout@v4
- name: Bootstrap Action Workspace
Expand All @@ -61,9 +59,9 @@ jobs:
- name: 'Tests: Unit'
run: ./build.bat test --test-suite unit

integrations-tests:
integration-tests:
runs-on: windows-2022
needs: [ 'format', 'tests' ]
needs: [ 'tests' ]
steps:
- uses: actions/checkout@v4
- name: Bootstrap Action Workspace
Expand All @@ -84,7 +82,7 @@ jobs:
startup-hook-tests:
runs-on: windows-2022
needs: [ 'format', 'tests' ]
needs: [ 'tests' ]
steps:
- uses: actions/checkout@v4
- name: Bootstrap Action Workspace
Expand All @@ -95,7 +93,7 @@ jobs:

profiler-tests:
runs-on: windows-2022
needs: [ 'format', 'tests' ]
needs: [ 'tests' ]
steps:
- uses: actions/checkout@v4
- name: Bootstrap Action Workspace
Expand All @@ -109,8 +107,7 @@ jobs:

test-iis:
runs-on: windows-latest
needs: [ 'format', 'tests' ]

needs: [ 'tests' ]
steps:
- uses: actions/checkout@v4
- name: Bootstrap Action Workspace
Expand Down
3 changes: 0 additions & 3 deletions src/Elastic.Apm/Report/PayloadSenderV2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -393,9 +393,6 @@ private void ProcessQueueItems(object[] queueItems)
}
}

if (_logger.IsEnabled(LogLevel.Trace))


stream.Position = 0;
using (var content = new StreamContent(stream))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,19 @@ public class ServiceActivationTests : LoggingTestBase
public ServiceActivationTests(ITestOutputHelper xUnitOutputHelper) : base(xUnitOutputHelper /*, LogLevel.Debug */) =>
_logger = LoggerBase.Scoped(ThisClassName);


[Fact]
public void ShouldNotSendActivationMethodOnceBadVersionIsDiscovered()
{
var requests = FakeServerInformationCallAndEnqueue("8.7.0");
requests.Count.Should().Be(3);

requests.Should().HaveCount(3);
requests.Last().Should().NotContain("activation_method");
}

[Fact]
public void ShouldSendActivationMethodOtherVersions()
{
var requests = FakeServerInformationCallAndEnqueue("8.7.1");
requests.Count.Should().Be(3);

requests.Should().HaveCount(3);
requests.Last().Should().Contain("activation_method");
}

Expand Down Expand Up @@ -108,6 +105,10 @@ private List<string> FakeServerInformationCallAndEnqueue(string version)
agent.PayloadSender.QueueTransaction(new Transaction(agent, "TestName", "TestType"));

waitHandle.WaitHandle.WaitOne(TimeSpan.FromSeconds(5));

foreach (var request in requests)
LoggerBase?.Info()?.Log("Request: {Request}", request);

return requests;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public RabbitMqTests(RabbitMqFixture fixture, ITestOutputHelper output)
[InlineData("net8.0")]
public async Task CaptureAutoInstrumentedSpans(string targetFramework)
{
var apmLogger = new InMemoryBlockingLogger(Logging.LogLevel.Warning);
var apmLogger = new InMemoryBlockingLogger(Logging.LogLevel.Error);

Check failure on line 35 in test/profiler/Elastic.Apm.Profiler.Managed.Tests/RabbitMq/RabbitMqTests.cs

View workflow job for this annotation

GitHub Actions / profiler-tests

Elastic.Apm.Profiler.Managed.Tests.RabbitMq.RabbitMqTests.CaptureAutoInstrumentedSpans(targetFramework: "net8.0")

Expected transactions to contain 9 item(s), but found 2: {TransactionDto{Id: 0e99db0d30124636, TraceId: 08b4f5c913f446968b743470d501eb96, ParentId: null, Name: PublishAndGetIgnore, Type: messaging, IsSampled: True, Timestamp: 1733415654813324, Duration: 207.379, SpanCountDto: SpanCount{Started: 0, Dropped: 0}, Result: null, Context: ContextDto{Request: null, Response: null, User: null, Labels: null}}, TransactionDto{Id: 2ff263fcf03fc487, TraceId: a254e0910da78b4cb9f2c5fd36273d0c, ParentId: null, Name: PublishToConsumer, Type: messaging, IsSampled: True, Timestamp: 1733415655202966, Duration: 7.016, SpanCountDto: SpanCount{Started: 1, Dropped: 0}, Result: null, Context: ContextDto{Request: null, Response: null, User: null, Labels: null}}}.
var apmServer = new MockApmServer(apmLogger, nameof(CaptureAutoInstrumentedSpans));
var port = apmServer.FindAvailablePortToListen();
apmServer.RunInBackground(port);
Expand Down

0 comments on commit 215e1ea

Please sign in to comment.