Skip to content

Commit

Permalink
fix: prevent sending null session to backend connector (#159)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcollovati authored Nov 27, 2024
1 parent 31c2a13 commit 978c7c6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,9 @@ private void queueSerialization(String sessionId,
sessionId, clusterKey, error);
} else {
Consumer<SessionInfo> whenSerialized = sessionInfo -> {
backendConnector.sendSession(sessionInfo);
if (sessionInfo != null) {
backendConnector.sendSession(sessionInfo);
}
backendConnector
.markSerializationComplete(clusterKey);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,8 @@ void serialize_notSerializableException_notFallbackToPessimistic() {
verify(connector).markSerializationStarted(clusterSID);

await().atMost(500, MILLISECONDS).untilTrue(serializationCompleted);
verify(connector).sendSession(isNull());
verify(connector, never()).sendSession(any());
verify(connector).markSerializationComplete(clusterSID);
locks.forEach(l -> verify(l, never()).lock());

}
Expand Down

0 comments on commit 978c7c6

Please # to comment.