Skip to content
This repository has been archived by the owner on Jul 1, 2022. It is now read-only.

Add public method isFinished() on JaegerSpan #634

Merged
merged 2 commits into from
Aug 3, 2019
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 @@ -75,6 +75,12 @@ public long getStart() {
return startTimeMicroseconds;
}

public boolean isFinished() {
synchronized (this) {
return finished;
}
}

public long getDuration() {
synchronized (this) {
return durationMicroseconds;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,12 @@ public void testSetNumberTag() {
assertEquals(expected, jaegerSpan.getTags().get(key));
}

@Test
public void testFinished() {
jaegerSpan.finish();
assertTrue(jaegerSpan.isFinished());
}

@Test
public void testSetTag() {
jaegerSpan.setTag(new StringTag("stringTag"), "stringTagValue")
Expand Down