Skip to content

Commit

Permalink
Avoid using .overrideConfigKey() with archive-provided application.pr…
Browse files Browse the repository at this point in the history
…operties

It does not always work as expected, as I just realized.

(cherry picked from commit f34d59b)
  • Loading branch information
yrodiere authored and gsmet committed Aug 3, 2021
1 parent a3ce572 commit c10ee6c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ public class NoHibernatePropertiesTest {
})
.setArchiveProducer(() -> ShrinkWrap.create(JavaArchive.class)
.addClass(MyEntity.class)
.addAsResource(new StringAsset(""), "hibernate.properties")
.addAsResource("application.properties"))
.addAsResource(new StringAsset(""), "hibernate.properties"))
.withConfigurationResource("application.properties")
.overrideConfigKey("quarkus.datasource.devservices", "false");

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,10 @@ public class EntitiesInNamedPUWithoutDatasourceTest {
.isInstanceOf(ConfigurationException.class)
.hasMessageContainingAll("Datasource must be defined for persistence unit 'pu-1'.");
})
.withConfigurationResource("application-named-pu-no-datasource.properties")
.overrideConfigKey("quarkus.datasource.devservices", "false")
.setArchiveProducer(() -> ShrinkWrap.create(JavaArchive.class)
.addPackage(MyEntity.class.getPackage().getName())
.addAsResource("application-named-pu-no-datasource.properties",
"application.properties"));
.addPackage(MyEntity.class.getPackage().getName()));

@Test
public void testInvalidConfiguration() {
Expand Down

0 comments on commit c10ee6c

Please sign in to comment.