mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
Removed CHMUseCases tests which make little sense with new contexts
This commit is contained in:
@@ -656,28 +656,6 @@ public class CHMUseCasesTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetUsingWithCharSequenceNoValue() throws IOException {
|
||||
ChronicleMapBuilder<CharSequence, CharSequence> builder = ChronicleMapBuilder
|
||||
.of(CharSequence.class, CharSequence.class);
|
||||
|
||||
if (typeOfMap == TypeOfMap.STATELESS)
|
||||
return; // context supported by the STATELESS client
|
||||
|
||||
try (ChronicleMap<CharSequence, CharSequence> map = newInstance(builder)) {
|
||||
|
||||
try (MapKeyContext<CharSequence, CharSequence> c = map.context("1")) {
|
||||
CharSequence value = c.get();
|
||||
assertTrue(value instanceof StringBuilder);
|
||||
((StringBuilder) value).append("Hello World");
|
||||
}
|
||||
|
||||
assertEquals(null, map.get("1"));
|
||||
mapChecks();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testGetUsingWithIntValueNoValue() throws IOException {
|
||||
|
||||
@@ -699,32 +677,6 @@ public class CHMUseCasesTest {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Test(expected = IllegalStateException.class)
|
||||
public void testAcquireUsingWithIntValueNoValue() throws IOException {
|
||||
|
||||
if (typeOfMap == TypeOfMap.STATELESS)
|
||||
throw new IllegalStateException(); // acquireContext supported by the STATELESS
|
||||
|
||||
|
||||
ChronicleMapBuilder<CharSequence, IntValue> builder = ChronicleMapBuilder
|
||||
.of(CharSequence.class, IntValue.class);
|
||||
|
||||
try (ChronicleMap<CharSequence, IntValue> map = newInstance(builder)) {
|
||||
|
||||
try (MapKeyContext<CharSequence, IntValue> c = map.context("1")) {
|
||||
c.updateLock().lock();
|
||||
IntValue value = c.get();
|
||||
assertTrue(value instanceof IntValue);
|
||||
value.setValue(1);
|
||||
}
|
||||
|
||||
assertEquals(null, map.get("1"));
|
||||
mapChecks();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void testAcquireUsingImmutableUsing() throws IOException {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user