mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
HCOLL-155 cleaned up putOnClose
This commit is contained in:
@@ -1374,12 +1374,14 @@ public class ChronicleMapTest {
|
||||
}
|
||||
|
||||
try (WriteContext<?, LongValue> context = map.acquireUsingLocked("one", value)) {
|
||||
context.value().addValue(1);
|
||||
LongValue value1 = context.value();
|
||||
value1.addValue(1);
|
||||
}
|
||||
|
||||
// check that the entry was removed
|
||||
try (ReadContext<?, LongValue> context = map.getUsingLocked("one", value)) {
|
||||
assertEquals(2, context.value().getValue());
|
||||
LongValue value1 = context.value();
|
||||
assertEquals(2, value1.getValue());
|
||||
}
|
||||
|
||||
map.close();
|
||||
|
||||
Reference in New Issue
Block a user