Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@


using System.Collections.Generic;
using System.Linq;
using NewRelic.Agent.IntegrationTestHelpers;
using NewRelic.Agent.Tests.TestSerializationHelpers.Models;
using NewRelic.Testing.Assertions;
Expand Down Expand Up @@ -84,7 +83,7 @@ public void Test()
};


var transactionSample = _fixture.AgentLog.GetTransactionSamples().FirstOrDefault();
var transactionSample = _fixture.AgentLog.TryGetTransactionSample("WebTransaction/MVC/Home/Query/{data}");
var getDataTransactionEvent = _fixture.AgentLog.TryGetTransactionEvent("WebTransaction/MVC/Home/Query/{data}");
var getExceptionTransactionEvent = _fixture.AgentLog.TryGetTransactionEvent("WebTransaction/MVC/Home/ThrowException");

Expand All @@ -104,4 +103,4 @@ public void Test()
() => Assertions.TransactionEventHasAttributes(expectedErrorTransactionEventAttributes, TransactionEventAttributeType.Intrinsic, getExceptionTransactionEvent)
);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public void Test()

var displayHost = _fixture.AgentLog.GetConnectData().DisplayHost;
var getDataTransactionEvent = _fixture.AgentLog.TryGetTransactionEvent("WebTransaction/MVC/DefaultController/Query");
var transactionSample = _fixture.AgentLog.GetTransactionSamples().FirstOrDefault();
var transactionSample = _fixture.AgentLog.TryGetTransactionSample("WebTransaction/MVC/DefaultController/Query");
var errorEvents = _fixture.AgentLog.GetErrorEvents().ToList();
var errorTraces = _fixture.AgentLog.GetErrorTraces().ToList();
var firstErrorEvent = errorEvents.FirstOrDefault();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public void Test()
const string originalErrorMessage = "!Exception~Message!";

var displayHost = _fixture.AgentLog.GetConnectData().DisplayHost;
var transactionSample = _fixture.AgentLog.GetTransactionSamples().FirstOrDefault();
var transactionSample = _fixture.AgentLog.TryGetTransactionSample("WebTransaction/MVC/DefaultController/Query");
var getDataTransactionEvent = _fixture.AgentLog.TryGetTransactionEvent("WebTransaction/MVC/DefaultController/Query");
var getExceptionTransactionEvent = _fixture.AgentLog.TryGetTransactionEvent("WebTransaction/MVC/DefaultController/ThrowException");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public void Test()

const string originalErrorMessage = "!Exception~Message!";

var transactionSample = _fixture.AgentLog.GetTransactionSamples().FirstOrDefault();
var transactionSample = _fixture.AgentLog.TryGetTransactionSample("WebTransaction/MVC/DefaultController/Query");
var getDataTransactionEvent = _fixture.AgentLog.TryGetTransactionEvent("WebTransaction/MVC/DefaultController/Query");
var getExceptionTransactionEvent = _fixture.AgentLog.TryGetTransactionEvent("WebTransaction/MVC/DefaultController/ThrowException");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,12 @@ private void AddAdditionalEnvironmentVariableIfNotNull(string name, string value

private void WarmUpTestTool()
{
const int maxAttempts = 5;

for (var attempt = 1; attempt <= 3; attempt++)
// Give the tool a moment to start listening before the first probe
Thread.Sleep(TimeSpan.FromSeconds(5));

for (var attempt = 1; attempt <= maxAttempts; attempt++)
{
try
{
Expand All @@ -93,7 +97,7 @@ private void WarmUpTestTool()
catch (Exception e)
{
TestLogger?.WriteLine($"Unable to warm up lambda test tool during attempt {attempt}. Exception: {e}");
if (attempt == 3)
if (attempt == maxAttempts)
{
// Halt the test because the test tool was unable to start
throw;
Expand Down
Loading