use of java.nio.file.DirectoryNotEmptyException in project neo4j by neo4j.
the class BatchingNeoStoresTest method shouldNotOpenStoreWithNodesOrRelationshipsInIt.
@Test
void shouldNotOpenStoreWithNodesOrRelationshipsInIt() throws Throwable {
Config config = Config.defaults();
// GIVEN
someDataInTheDatabase(config);
// WHEN
DirectoryNotEmptyException exception = assertThrows(DirectoryNotEmptyException.class, () -> {
try (JobScheduler jobScheduler = new ThreadPoolJobScheduler()) {
RecordFormats recordFormats = selectForConfig(Config.defaults(), NullLogProvider.getInstance());
try (BatchingNeoStores store = batchingNeoStores(fileSystem, databaseLayout, recordFormats, Configuration.DEFAULT, NullLogService.getInstance(), EMPTY, Config.defaults(), jobScheduler, PageCacheTracer.NULL, INSTANCE)) {
store.createNew();
}
}
});
assertThat(exception.getMessage()).contains("already contains");
}
Aggregations