Skip to content

Commit

Permalink
[sinttest] Improve TimeoutException's message of ResultSyncPoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Flowdalic committed May 21, 2024
1 parent 2a5cf14 commit 34c2d52
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
*
* Copyright 2015 Florian Schmaus
* Copyright 2015-2024 Florian Schmaus
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -50,7 +50,12 @@ public R waitForResult(long timeout, String timeoutMessage) throws E, Interrupte
if (exception != null) {
throw exception;
}
throw new TimeoutException(timeoutMessage == null ? "Timeout expired" : timeoutMessage);

String message = "Timeout after " + timeout + "ms";
if (timeoutMessage != null) {
message += ": " + timeoutMessage;
}
throw new TimeoutException(message);
}


Expand Down

0 comments on commit 34c2d52

Please sign in to comment.