NIFI-4049 Fixing unit test that doesn't run on OSX and caused Travis failure

This commit is contained in:
Bryan Bende 2017-06-12 16:36:23 -04:00
parent de1b84e2aa
commit 2b47ade0c4
No known key found for this signature in database
GPG Key ID: A0DDA9ED50711C39
1 changed files with 4 additions and 4 deletions

View File

@ -589,9 +589,9 @@ public class TestServerAndClient {
// Client 1 and 2 fetch the key // Client 1 and 2 fetch the key
AtomicCacheEntry<String, String, Long> c1 = client1.fetch(key, stringSerializer, stringDeserializer); AtomicCacheEntry<String, String, Long> c1 = client1.fetch(key, stringSerializer, stringDeserializer);
AtomicCacheEntry<String, String, Long> c2 = client2.fetch(key, stringSerializer, stringDeserializer); AtomicCacheEntry<String, String, Long> c2 = client2.fetch(key, stringSerializer, stringDeserializer);
assertEquals(0, c1.getRevision()); assertEquals(new Long(0), c1.getRevision().orElse(0L));
assertEquals("valueC1-0", c1.getValue()); assertEquals("valueC1-0", c1.getValue());
assertEquals(0, c2.getRevision()); assertEquals(new Long(0), c2.getRevision().orElse(0L));
assertEquals("valueC1-0", c2.getValue()); assertEquals("valueC1-0", c2.getValue());
// Client 1 replace // Client 1 replace
@ -606,7 +606,7 @@ public class TestServerAndClient {
// Client 2 fetch the key again // Client 2 fetch the key again
c2 = client2.fetch(key, stringSerializer, stringDeserializer); c2 = client2.fetch(key, stringSerializer, stringDeserializer);
assertEquals("valueC1-1", c2.getValue()); assertEquals("valueC1-1", c2.getValue());
assertEquals(1, c2.getRevision()); assertEquals(new Long(1), c2.getRevision().orElse(0L));
// Now, Client 2 knows the correct revision so it can replace the key // Now, Client 2 knows the correct revision so it can replace the key
c2.setValue("valueC2-2"); c2.setValue("valueC2-2");
@ -616,7 +616,7 @@ public class TestServerAndClient {
// Assert the cache // Assert the cache
c2 = client2.fetch(key, stringSerializer, stringDeserializer); c2 = client2.fetch(key, stringSerializer, stringDeserializer);
assertEquals("valueC2-2", c2.getValue()); assertEquals("valueC2-2", c2.getValue());
assertEquals(2, c2.getRevision()); assertEquals(new Long(2), c2.getRevision().orElse(0L));
client1.close(); client1.close();
client2.close(); client2.close();