Search in sources :

Example 1 with VanillaChronicleMap

use of net.openhft.chronicle.map.VanillaChronicleMap in project java by wavefrontHQ.

the class MapLoaderTest method testCorruptedFileFallsBackToInMemory.

// NOTE: Chronicle's repair attempt takes >1min for whatever reason.
@Ignore
@Test
public void testCorruptedFileFallsBackToInMemory() throws IOException {
    FileOutputStream fos = new FileOutputStream(file);
    fos.write("Nonsense".getBytes());
    fos.flush();
    ConcurrentMap<HistogramKey, AgentDigest> map = loader.get(file);
    assertThat(((VanillaChronicleMap) map).file()).isNull();
    testPutRemove(map);
}
Also used : HistogramKey(com.wavefront.agent.histogram.Utils.HistogramKey) FileOutputStream(java.io.FileOutputStream) AgentDigest(com.tdunning.math.stats.AgentDigest) VanillaChronicleMap(net.openhft.chronicle.map.VanillaChronicleMap) Ignore(org.junit.Ignore) Test(org.junit.Test)

Aggregations

AgentDigest (com.tdunning.math.stats.AgentDigest)1 HistogramKey (com.wavefront.agent.histogram.Utils.HistogramKey)1 FileOutputStream (java.io.FileOutputStream)1 VanillaChronicleMap (net.openhft.chronicle.map.VanillaChronicleMap)1 Ignore (org.junit.Ignore)1 Test (org.junit.Test)1