Skip to content

Commit

Permalink
chore: Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
izaaz committed Aug 21, 2024
1 parent 1a72e0f commit 48aec4b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/main/java/com/amplitude/HttpTransport.java
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,8 @@ public void run() {
callbackMessage = "Unknown response status.";
}
} catch (Exception exception) {
callbackMessage = "Error sending events due to the exception: " + exception.getMessage();
callbackMessage =
"Error sending events due to the exception: " + exception + ". Message: " + exception.getMessage();
logger.error("Flush Thread Error", Utils.getStackTrace(exception));
logger.error("Error event payload", events.toString());
} finally {
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/com/amplitude/HttpTransportTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ public void testThreadTimeoutCallback()
@Override
public void onLogEventServerResponse(Event event, int status, String message) {
resultMap.put(event, status);
assertEquals("Error send events", message);
assertEquals("Error sending events due to the exception: java.util.concurrent.TimeoutException. Message: null", message);
latch.countDown();
}
};
Expand Down

0 comments on commit 48aec4b

Please sign in to comment.