Skip to content

Commit cf3e3f0

Browse files
committed
fix: Avoid intermittent failures in resubscribe test case
1 parent a56d4f7 commit cf3e3f0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/server-common/src/test/java/io/a2a/server/apps/common/AbstractA2AServerTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -791,6 +791,11 @@ protected boolean isStreamClosedError(Throwable throwable) {
791791
if (cause instanceof EOFException) {
792792
return true;
793793
}
794+
if (cause instanceof IOException && cause.getMessage() != null
795+
&& cause.getMessage().contains("cancelled")) {
796+
// stream is closed upon cancellation
797+
return true;
798+
}
794799
cause = cause.getCause();
795800
}
796801
return false;

0 commit comments

Comments
 (0)