Add debugging to detect when stores are unmapped (clean up)

This commit is contained in:
Peter Lawrey
2015-02-04 20:00:52 +00:00
parent e4aa1cf396
commit dc43dd2b1e
3 changed files with 58 additions and 26 deletions
@@ -7,15 +7,13 @@ import net.openhft.chronicle.hash.replication.TcpTransportAndNetworkConfig;
import net.openhft.chronicle.map.fromdocs.BondVOInterface;
import net.openhft.lang.io.ByteBufferBytes;
import net.openhft.lang.io.Bytes;
import net.openhft.lang.io.MappedStore;
import net.openhft.lang.io.serialization.BytesMarshallable;
import net.openhft.lang.io.serialization.impl.*;
import net.openhft.lang.model.constraints.MaxSize;
import net.openhft.lang.model.constraints.NotNull;
import net.openhft.lang.values.*;
import org.junit.After;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.*;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
@@ -2622,6 +2620,19 @@ public class CHMUseCasesTest {
}
}
}
@BeforeClass
public static void initGlobals() {
assertFalse("Unfriendly clean in a previous test", MappedStore.unfriendlyClean.getAndSet(false));
}
@After
public void systemGC() {
System.gc();
assertFalse("Unfriendly clean", MappedStore.unfriendlyClean.getAndSet(false));
}
}
interface IData extends BytesMarshallable {