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 @@ -59,8 +59,8 @@ public SimpleSpan nextSpan(Span parent) {
public SimpleSpan onlySpan() {
assertTrue(this.spans.size() == 1, "There must be only one span");
SimpleSpan span = this.spans.getFirst();
assertTrue(span.getStartTimestamp().getNano() > 0, "Span must be started");
assertTrue(span.getEndTimestamp().getNano() > 0, "Span must be finished");
assertTrue(span.getStartTimestamp().toEpochMilli() > 0, "Span must be started");
assertTrue(span.getEndTimestamp().toEpochMilli() > 0, "Span must be finished");
return span;
}

Expand All @@ -79,7 +79,7 @@ private void assertTrue(boolean condition, String text) {
public SimpleSpan lastSpan() {
assertTrue(!this.spans.isEmpty(), "There must be at least one span");
SimpleSpan span = this.spans.getLast();
assertTrue(span.getStartTimestamp().getNano() > 0, "Span must be started");
assertTrue(span.getStartTimestamp().toEpochMilli() > 0, "Span must be started");
return span;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ public SELF isNotStarted() {
*/
public SELF isEnded() {
isNotNull();
if (this.actual.getEndTimestamp().getEpochSecond() == 0) {
if (this.actual.getEndTimestamp().toEpochMilli() == 0) {
failWithMessage("Span should be ended");
}
return (SELF) this;
Expand All @@ -337,7 +337,7 @@ public SELF isEnded() {
*/
public SELF isNotEnded() {
isNotNull();
if (this.actual.getEndTimestamp().getEpochSecond() != 0) {
if (this.actual.getEndTimestamp().toEpochMilli() != 0) {
failWithMessage("Span should not be ended");
}
return (SELF) this;
Expand Down