Skip to content

Commit

Permalink
GEODE-9536: Disable client version test on Windows (#6971)
Browse files Browse the repository at this point in the history
PROBLEM

When a server receives a connection request with an unrecognized client
version, it sends an informative reply and immediately closes the
socket.

In this situation, the client wants to throw a
`ServerRefusedConnectionException` with a message that includes the
server's informative reply.

On Windows, when the client attempts to read the server's reply, the
socket throws a `SocketException` with the message "Connection reset".
As a result, the caller never receives the informative
`ServerRefusedConnectionException`.

SOLUTION

Disable this test on Windows until the underlying issue is fixed.  See
https://issues.apache.org/jira/browse/GEODE-9698

NOTE

This prepares for an upcoming PR to run all distributed tests (except
explicitly ignored ones like these) on Windows.
  • Loading branch information
demery-pivotal authored Oct 12, 2021
1 parent e9320c5 commit 7dd6143
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

import java.util.Properties;

import org.junit.ClassRule;
import org.junit.Test;
import org.junit.experimental.categories.Category;

Expand All @@ -48,12 +49,17 @@
import org.apache.geode.test.dunit.VM;
import org.apache.geode.test.dunit.internal.JUnit4DistributedTestCase;
import org.apache.geode.test.junit.categories.ClientServerTest;
import org.apache.geode.test.junit.rules.IgnoreOnWindowsRule;

/**
* Test to verify that server responds to a higher versioned client.
*/
@Category({ClientServerTest.class})
public class BackwardCompatibilityHigherVersionClientDUnitTest extends JUnit4DistributedTestCase {
// On Windows, when the server closes the socket, the client can't read the server's reply. The
// client quietly ignores the server's reply rather than throwing the required exception.
@ClassRule
public static IgnoreOnWindowsRule ignoreOnWindowsRule = new IgnoreOnWindowsRule();

/** the cache */
private static Cache cache = null;
Expand Down

0 comments on commit 7dd6143

Please sign in to comment.