MCPcopy Create free account
hub / github.com/cruppstahl/upscaledb / testEraseDatabase

Method testEraseDatabase

java/unittests/EnvironmentTest.java:238–261  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

236 }
237
238 public void testEraseDatabase() {
239 Environment env = new Environment();
240 byte[] key = new byte[10];
241 byte[] rec = new byte[10];
242 rec[0] = 0x13;
243 try {
244 env.create("jtest.db");
245 Database db = env.createDatabase((short)13);
246 db.insert(key, rec);
247 db.close();
248 env.eraseDatabase((short)13);
249 }
250 catch (DatabaseException err) {
251 fail("Exception " + err);
252 }
253 try {
254 Database db = env.openDatabase((short)13);
255 db.close();
256 }
257 catch (DatabaseException err) {
258 assertEquals(Const.UPS_DATABASE_NOT_FOUND, err.getErrno());
259 }
260 env.close();
261 }
262
263 public void testGetDatabaseNames() {
264 Environment env = new Environment();

Callers

nothing calls this directly

Calls 8

createMethod · 0.95
createDatabaseMethod · 0.95
insertMethod · 0.95
closeMethod · 0.95
eraseDatabaseMethod · 0.95
openDatabaseMethod · 0.95
closeMethod · 0.95
getErrnoMethod · 0.80

Tested by

no test coverage detected