From 93de056b26c9c2f38825c47078adf8f6080e692a Mon Sep 17 00:00:00 2001 From: Rob Austin Date: Thu, 14 May 2015 10:54:54 +0100 Subject: [PATCH] improved map full test for the stateless client --- .../openhft/chronicle/map/StatelessClientTest.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/test/java/net/openhft/chronicle/map/StatelessClientTest.java b/src/test/java/net/openhft/chronicle/map/StatelessClientTest.java index 47fd1d30f..eb2fc6299 100644 --- a/src/test/java/net/openhft/chronicle/map/StatelessClientTest.java +++ b/src/test/java/net/openhft/chronicle/map/StatelessClientTest.java @@ -207,15 +207,21 @@ public class StatelessClientTest { } - @Test(timeout = 10000) - public void testLotsOfPuts() throws IOException, InterruptedException { + /** + * test that when the map is full and exception is thrown back to the user + * + * @throws IOException + * @throws InterruptedException + */ + @Test(timeout = 10000, expected = IllegalStateException.class) + public void testExceptionFromServer() throws IOException, InterruptedException { int port = s_port++; - final int size = 10000; + final int size = 100; try (ChronicleMap serverMap = ChronicleMapBuilder .of(Integer.class, CharSequence.class) - .entries(100) + .entries(10) .replication((byte) 2, TcpTransportAndNetworkConfig.of(port)) .create()) { try (ChronicleMap statelessMap = localClient(port)) {