This test throws a "Map is closed" exception (in 1.3.173) and I don't 
believe it should.  Looks like MVMap.openMap(...) is not checking for 
"!old.isClosed()"?

    @Test
    public void testMVMapClearReOpen() {
    // open MVMap
    File f = new File(System.getProperty("java.io.tmpdir"), "cache.data");
    MVStore store = new 
MVStore.Builder().fileName(f.getAbsolutePath()).open();
    MVMap<String,Object> map = store.openMap("foo");
    
    // should initally be empty
    assertTrue(map.isEmpty());
    
    // add one item and close
    map.put("foo", "bar");
    assertEquals(1, map.getSize());
    map.close();
    
    // re-open, should still have 1 item it, clear all items and close
    map = store.openMap("foo");
    assertEquals(1, map.getSize());
    map.clear();
    assertEquals(0, map.getSize());
    map.close();
    
    // re-open, should have 0 items
    map = store.openMap("foo");
    assertTrue(map.isEmpty());
    map.close();
    }

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to