Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.mapdb;
 
 import org.junit.Test;
 
 import java.io.File;
 
 import static org.hamcrest.CoreMatchers.is;
 import static org.hamcrest.MatcherAssert.assertThat;
public class Issue237Test {
    File file = UtilsTest.tempDbFile();
    @Test
    public void testReopenAsync() throws InterruptedException {
        DB database = DBMaker.newFileDB ).asyncWriteEnable().make();
        testQueuedatabase );
        database = DBMaker.newFileDB ).asyncWriteEnable().make();
        testQueuedatabase );
    }
    @Test
    public void testReopenSync() throws InterruptedException {
        .delete();
        DB database = DBMaker.newFileDB ).make();
        testQueuedatabase );
        database = DBMaker.newFileDB ).make();
        testQueuedatabase );
    }
    private void testQueueDB database ) throws InterruptedException {
        BlockingQueue<Stringqueue = database.getQueue"test-queue" );
        queue.add"test-value" );
        database.commit();
        assertThatqueue.take(), is"test-value" ) );
        database.commit();
        database.close();
    }
New to GrepCode? Check out our FAQ X