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 1 commit
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,10 @@ public long getStart() {
return startTimeMicroseconds;
}

public boolean isFinished() {
return finished;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs synchronized (this), see finish() method

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

}

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