diff --git a/mdbxjni/src/test/java/com/castortech/mdbxjni/EnvTest.java b/mdbxjni/src/test/java/com/castortech/mdbxjni/EnvTest.java index d46f445..f29809b 100644 --- a/mdbxjni/src/test/java/com/castortech/mdbxjni/EnvTest.java +++ b/mdbxjni/src/test/java/com/castortech/mdbxjni/EnvTest.java @@ -112,8 +112,9 @@ public void testEnvInfo() throws Exception { String path = tmp.newFolder().getCanonicalPath(); try (Env env = new Env()) { // env.addFlags(CREATE); + env.setGeometry(1048576L, -1L, 4000L * 1024 * 1024, 1048576L, -1L, -1L); env.open(path); - env.setMapSize(1048576L); +// env.setMapSize(1048576L); try (Database db = env.openDatabase()) { db.put(new byte[]{1}, new byte[]{1}); EnvInfo info = env.info(); diff --git a/mdbxjni/src/test/java/com/castortech/mdbxjni/InsertTest.java b/mdbxjni/src/test/java/com/castortech/mdbxjni/InsertTest.java index 0cf27d1..6b9f3f0 100644 --- a/mdbxjni/src/test/java/com/castortech/mdbxjni/InsertTest.java +++ b/mdbxjni/src/test/java/com/castortech/mdbxjni/InsertTest.java @@ -74,6 +74,8 @@ public void before() throws Exception { // envConfig.setSafeNoSync(true); // envConfig.setWriteMap(true); + envConfig.setMapSize(2000L * 1024 * 1024); //2gb + envConfig.setMapGrowth(1000L * 1024 * 1024); //1gb //nosync // envConfig.setWriteMap(true); @@ -84,7 +86,6 @@ public void before() throws Exception { env = new Env(); env.setMaxDbs(2); - env.setMapSize(6000L * 1024 * 1024); //4gb Env.pushMemoryPool(1024*512); env.open(path, envConfig); // db = env.openDatabase("primary");