ReconnectionTest:: testAutomaticReconnection WithCompression

Hi

The test code is:

public void testAutomaticReconnectionWithCompression() throws Exception {

// Create the configuration for this new connection

ConnectionConfiguration config = new ConnectionConfiguration(getHost(), getPort());

config.setCompressionEnabled(true);

config.setSASLAuthenticationEnabled(true);

XMPPConnection connection = new XMPPConnection(config);

// Connect to the server

connection.connect();

// Log into the server

connection.login(getUsername(0), getUsername(0), “MyOtherResource”);

assertTrue(“Failed to use compression”, connection.isUsingCompression()); //Line 54

The value of connection.isUsingCompression() is false even though the code has:

config.setCompressionEnabled(true);

Since the text in the assertion implies that compression should not be used, but the actual test implies it should, I am unsure what is being tested for here really.

Also, I can see that compressionMethods is null. That implies, I imagine, that compression methods need to be set in some way. The test code doesn’t set compression explicitly itself, so I’d guess that compression is either built in (but not working) or compression should be configured somewhere/how.

Any ideas about how compression should work, and so what this test should look like?

Thanks

Nathan