Issue #2238 - RoundRobinConnectionPoolTest.testRoundRobin test failure

Improved logging in case of test failures.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
This commit is contained in:
Simone Bordet 2018-02-27 18:49:05 +01:00
parent 72f4f13510
commit cd7432da95
1 changed files with 1 additions and 1 deletions

View File

@ -74,7 +74,7 @@ public class RoundRobinConnectionPoolTest extends AbstractHttpClientServerTest
int base = i % maxConnections; int base = i % maxConnections;
int expected = remotePorts.get(base); int expected = remotePorts.get(base);
int candidate = remotePorts.get(i); int candidate = remotePorts.get(i);
Assert.assertThat(expected, Matchers.equalTo(candidate)); Assert.assertThat(client.dump() + System.lineSeparator() + remotePorts.toString(), expected, Matchers.equalTo(candidate));
if (i > 0) if (i > 0)
Assert.assertThat(remotePorts.get(i - 1), Matchers.not(Matchers.equalTo(candidate))); Assert.assertThat(remotePorts.get(i - 1), Matchers.not(Matchers.equalTo(candidate)));
} }