Fix H2 R2DBC URL on Windows

Closes gh-29875
pull/29884/head
Andy Wilkinson 3 years ago
parent 100f80d073
commit 18e49b0269

@ -38,9 +38,12 @@ class R2dbcScriptDatabaseInitializerTests
.withUrl("r2dbc:h2:mem:///" + UUID.randomUUID() + "?options=DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE") .withUrl("r2dbc:h2:mem:///" + UUID.randomUUID() + "?options=DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE")
.build(); .build();
private final ConnectionFactory standaloneConnectionFactory = ConnectionFactoryBuilder.withUrl("r2dbc:h2:file:///" private final ConnectionFactory standaloneConnectionFactory = ConnectionFactoryBuilder
+ new BuildOutput(R2dbcScriptDatabaseInitializerTests.class).getRootLocation().toURI().getPath() .withUrl("r2dbc:h2:file:///"
+ UUID.randomUUID() + "?options=DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE").build(); + new BuildOutput(R2dbcScriptDatabaseInitializerTests.class).getRootLocation().getAbsolutePath()
.replace('\\', '/')
+ "/" + UUID.randomUUID() + "?options=DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE")
.build();
@Override @Override
protected R2dbcScriptDatabaseInitializer createEmbeddedDatabaseInitializer( protected R2dbcScriptDatabaseInitializer createEmbeddedDatabaseInitializer(

Loading…
Cancel
Save