use of org.neo4j.logging.AssertableLogProvider in project neo4j by neo4j.
the class DefaultFileDeletionEventListenerTest method noNotificationAboutAnotherDatabaseDirectoryRemoval.
@Test
void noNotificationAboutAnotherDatabaseDirectoryRemoval() {
AssertableLogProvider internalLogProvider = new AssertableLogProvider(false);
DefaultFileDeletionEventListener listener = buildListener(internalLogProvider);
listener.fileDeleted(databaseRootKey, "foo");
assertThat(internalLogProvider).doesNotHaveAnyLogs();
}
use of org.neo4j.logging.AssertableLogProvider in project neo4j by neo4j.
the class DefaultFileDeletionEventListenerTest method notificationInLogAboutFileDeletion.
@Test
void notificationInLogAboutFileDeletion() {
AssertableLogProvider internalLogProvider = new AssertableLogProvider(false);
DefaultFileDeletionEventListener listener = buildListener(internalLogProvider);
listener.fileDeleted(databaseDirKey, "testFile");
listener.fileDeleted(databaseDirKey, "anotherDirectory");
var databaseName = databaseLayout.getDatabaseName();
assertThat(internalLogProvider).containsMessages("'testFile' which belongs to the '" + databaseName + "' database was deleted while it was running.", "'anotherDirectory' which belongs to the '" + databaseName + "' database was deleted while it was running.");
}
use of org.neo4j.logging.AssertableLogProvider in project neo4j by neo4j.
the class DefaultFileDeletionEventListenerTest method notificationAboutAnotherDatabaseLogsDirectoryRemoval.
@Test
void notificationAboutAnotherDatabaseLogsDirectoryRemoval() {
AssertableLogProvider internalLogProvider = new AssertableLogProvider(false);
DefaultFileDeletionEventListener listener = buildListener(internalLogProvider);
listener.fileDeleted(databaseLogsRootKey, "bar");
assertThat(internalLogProvider).doesNotHaveAnyLogs();
}
use of org.neo4j.logging.AssertableLogProvider in project neo4j by neo4j.
the class DefaultFileDeletionEventListenerTest method notificationAboutLogsDirectoryRemoval.
@Test
void notificationAboutLogsDirectoryRemoval() {
AssertableLogProvider internalLogProvider = new AssertableLogProvider(false);
DefaultFileDeletionEventListener listener = buildListener(internalLogProvider);
String databaseName = databaseLayout.getDatabaseName();
listener.fileDeleted(databaseLogsRootKey, databaseName);
assertThat(internalLogProvider).containsMessages("'" + databaseName + "' which belongs to the '" + databaseName + "' database was deleted while it was running.");
}
use of org.neo4j.logging.AssertableLogProvider in project neo4j by neo4j.
the class DefaultFileDeletionEventListenerTest method notificationAboutDatabaseDirectoryRemoval.
@Test
void notificationAboutDatabaseDirectoryRemoval() {
AssertableLogProvider internalLogProvider = new AssertableLogProvider(false);
DefaultFileDeletionEventListener listener = buildListener(internalLogProvider);
String databaseName = databaseLayout.getDatabaseName();
listener.fileDeleted(databaseRootKey, databaseName);
assertThat(internalLogProvider).containsMessages("'" + databaseName + "' which belongs to the '" + databaseName + "' database was deleted while it was running.");
}
Aggregations