Fix test ConfigTest such that it doesn't set the RunOnceMarker

When tests are run using for example -Dprops.file=testconfig/ebean-postgres.properties ... then we want ebean-test AutoConfigureForTesting to run and setup the default datasource appropriately. If ConfigTest runs before that then it sets the RunOnceMarker and the default datasource isn't adjusted
This commit is contained in:
Rob Bygrave
2022-03-28 09:12:13 +13:00
parent b85bb5f459
commit dcd3bfee4c
@@ -1,7 +1,11 @@
package io.ebean.test.config.platform;
import io.ebean.annotation.Platform;
import io.ebean.config.DatabaseConfig;
import io.ebean.datasource.DataSourceConfig;
import io.ebeaninternal.api.DbOffline;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
@@ -12,6 +16,17 @@ import static org.assertj.core.api.Assertions.assertThat;
public class ConfigTest {
@BeforeAll
public static void before() {
// so that RunOnceMarker is not set when running these tests
DbOffline.setPlatform(Platform.H2);
}
@AfterAll
public static void after() {
DbOffline.reset();
}
@Test
public void trimExtensions() {