mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
fixed up some broken tests
This commit is contained in:
@@ -418,7 +418,7 @@ public class ChronicleMapTest {
|
||||
map.close();
|
||||
}
|
||||
|
||||
@Test
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void testAcquireWithNullContainer() throws Exception {
|
||||
ChronicleMap<CharSequence, LongValue> map = getSharedMap(10 * 1000, 128, 24);
|
||||
map.acquireUsing("key", new LongValue$$Native());
|
||||
|
||||
@@ -40,18 +40,19 @@ public class DefaultValueTest {
|
||||
try (ChronicleMap<String, List<Integer>> map = ChronicleMapBuilder
|
||||
.of(String.class, (Class<List<Integer>>) ((Class) List.class))
|
||||
.defaultValue(defaultValue).createPersistedTo(file)) {
|
||||
|
||||
assertEquals(defaultValue, map.acquireUsing("a", null));
|
||||
ArrayList<Integer> using = new ArrayList<Integer>();
|
||||
assertEquals(defaultValue, map.acquireUsing("a", using));
|
||||
assertEquals(1, map.size());
|
||||
|
||||
map.put("b", Arrays.asList(1, 2));
|
||||
assertEquals(Arrays.asList(1, 2), map.acquireUsing("b", null));
|
||||
assertEquals(Arrays.asList(1, 2), map.acquireUsing("b", using));
|
||||
}
|
||||
|
||||
ArrayList<Integer> using = new ArrayList<Integer>();
|
||||
try (ChronicleMap<String, List<Integer>> map = ChronicleMapBuilder
|
||||
.of(String.class, (Class<List<Integer>>) ((Class) List.class))
|
||||
.createPersistedTo(file)) {
|
||||
assertEquals(defaultValue, map.acquireUsing("c", null));
|
||||
assertEquals(defaultValue, map.acquireUsing("c", using));
|
||||
}
|
||||
} finally {
|
||||
file.delete();
|
||||
|
||||
Reference in New Issue
Block a user