Skip to content

Commit

Permalink
Update AWSXRayRecorderTest.java
Browse files Browse the repository at this point in the history
  • Loading branch information
atshaw43 authored Jul 24, 2023
1 parent 1a88af7 commit 63e3122
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -967,10 +967,6 @@ public void testDefaultContextMissingBehaviorEnd() {

@Test
public void testMalformedTraceId() {
AWSXRayRecorder recorder = AWSXRayRecorderBuilder.standard()
.withSamplingStrategy(new NoSamplingStrategy())
.build();

TraceHeader malformedHeader = TraceHeader.fromString("malformedTraceID");

PowerMockito.stub(PowerMockito.method(
Expand All @@ -981,6 +977,10 @@ public void testMalformedTraceId() {
LambdaSegmentContextResolver.class, "getLambdaTaskRoot"))
.toReturn("/var/task");

AWSXRayRecorder recorder = AWSXRayRecorderBuilder.standard()
.withSamplingStrategy(new NoSamplingStrategy())
.build();

recorder.beginSubsegment("Test");

// Sanity checks that this is a NoOpSubsegment. (We cannot compare the instance of the private class directly)
Expand Down

0 comments on commit 63e3122

Please sign in to comment.