Skip to content

Commit

Permalink
Address review comment
Browse files Browse the repository at this point in the history
Signed-off-by: Gagan Juneja <[email protected]>
  • Loading branch information
Gagan Juneja committed Sep 7, 2023
1 parent d136412 commit b00970c
Showing 1 changed file with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

import java.io.IOException;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;

import static org.mockito.ArgumentMatchers.any;
Expand Down Expand Up @@ -250,7 +249,7 @@ public void testEndSpanByClosingSpanScopeMultiple() {
* 4. verify the current_span is still the same on async thread as the 2
* 5. verify the main thread has current span as null.
*/
public void testSpanAcrossThreads() throws ExecutionException, InterruptedException {
public void testSpanAcrossThreads() {
TracingTelemetry tracingTelemetry = new MockTracingTelemetry();
ThreadContext threadContext = new ThreadContext(Settings.EMPTY);

Expand Down Expand Up @@ -279,10 +278,10 @@ public void testSpanAcrossThreads() throws ExecutionException, InterruptedExcept
span.endSpan();
assertEquals(null, defaultTracer.getCurrentSpan());
}, executorService);
asyncTask.get();
asyncTask.join();
}

public void testSpanCloseOnThread2() throws ExecutionException, InterruptedException {
public void testSpanCloseOnThread2() {
TracingTelemetry tracingTelemetry = new MockTracingTelemetry();
ThreadContext threadContext = new ThreadContext(Settings.EMPTY);
ThreadContextBasedTracerContextStorage spanTracerStorage = new ThreadContextBasedTracerContextStorage(
Expand All @@ -308,7 +307,7 @@ public void onFailure(Exception e) {
}
}), executorService);
assertEquals(span, defaultTracer.getCurrentSpan().getSpan());
asyncTask.get();
asyncTask.join();
}
assertEquals(null, defaultTracer.getCurrentSpan());
}
Expand All @@ -326,7 +325,7 @@ private void async(ActionListener<Boolean> actionListener) {
* 6. verify the current_span is still the same on async thread as the 2
* 7. verify the main thread has current span as null.
*/
public void testSpanAcrossThreadsMultipleSpans() throws ExecutionException, InterruptedException {
public void testSpanAcrossThreadsMultipleSpans() {
TracingTelemetry tracingTelemetry = new MockTracingTelemetry();
ThreadContext threadContext = new ThreadContext(Settings.EMPTY);

Expand Down Expand Up @@ -367,7 +366,7 @@ public void testSpanAcrossThreadsMultipleSpans() throws ExecutionException, Inte
parentSpan.endSpan();
assertEquals(null, defaultTracer.getCurrentSpan());
}, executorService);
asyncTask.get();
asyncTask.join();
}

public void testClose() throws IOException {
Expand Down

0 comments on commit b00970c

Please sign in to comment.