Search in sources :

Example 1 with DbmsExtension

use of org.neo4j.test.extension.DbmsExtension in project neo4j by neo4j.

the class ConstraintCreationIT method shouldNotLeaveLuceneIndexFilesHangingAroundIfConstraintCreationFails.

@Test
@DbmsExtension(configurationCallback = "configureLuceneSubProvider")
void shouldNotLeaveLuceneIndexFilesHangingAroundIfConstraintCreationFails() {
    // given
    attemptAndFailConstraintCreation();
    // then
    IndexProvider indexProvider = indexProviderMap.getDefaultProvider();
    Path indexDir = indexProvider.directoryStructure().directoryForIndex(indexId);
    assertFalse(Files.exists(indexDir));
}
Also used : IndexProvider(org.neo4j.kernel.api.index.IndexProvider) Path(java.nio.file.Path) Test(org.junit.jupiter.api.Test) DbmsExtension(org.neo4j.test.extension.DbmsExtension)

Aggregations

Path (java.nio.file.Path)1 Test (org.junit.jupiter.api.Test)1 IndexProvider (org.neo4j.kernel.api.index.IndexProvider)1 DbmsExtension (org.neo4j.test.extension.DbmsExtension)1