diff --git a/src/com/sun/ts/tests/websocket/ee/javax/websocket/remoteendpoint/basic/WSCServerSideServer.java b/src/com/sun/ts/tests/websocket/ee/javax/websocket/remoteendpoint/basic/WSCServerSideServer.java index e4de4438a9..e55a853d3e 100644 --- a/src/com/sun/ts/tests/websocket/ee/javax/websocket/remoteendpoint/basic/WSCServerSideServer.java +++ b/src/com/sun/ts/tests/websocket/ee/javax/websocket/remoteendpoint/basic/WSCServerSideServer.java @@ -150,7 +150,7 @@ public void onError(Session session, Throwable t) throws IOException { * Again, since the asynchronous thread sends message in virtually no time, * one does not have any force to hold that send operation in its thread, to * check the send operation is really unblocking and asynchronous - * + * * @param asyncRemote * @return */ @@ -327,6 +327,11 @@ protected static String batchingAllowed(Basic basicRemote) { // really there is nothing to test, except that the exception is // not thrown basicRemote.sendText(OPS.BATCHING_ALLOWED.name()); + basicRemote.flushBatch(); + // If batching is supported then it will currently be enabled. + // Reset it so subsequent messages are not batched causing the + // test to fail. + basicRemote.setBatchingAllowed(allowed); return RESPONSE[0]; } catch (Exception e) { e.printStackTrace();