zonkyio / embedded-database-spring-test

A library for creating isolated embedded databases for Spring-powered integration tests.
Apache License 2.0
407 stars 37 forks source link

Getting an IllegalStateException when running in jenkins #50

Closed janeliu closed 5 years ago

janeliu commented 5 years ago

Hello,

I'm using embedded-database-spring-test with flyway-spring-test. It works great on my workstation when running the tests in either intellij or the maven command line directly. But when jenkins tries to run the tests I get an IllegalStateException.

I fully expect this is a configuration issue on my part but I'm not sure where to look based on the log output.

Here's the dependencies from my pom:

        <dependency>
            <groupId>io.zonky.test</groupId>
            <artifactId>embedded-database-spring-test</artifactId>
            <version>1.4.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.flywaydb.flyway-test-extensions</groupId>
            <artifactId>flyway-spring-test</artifactId>
            <version>5.2.1</version>
            <scope>test</scope>
        </dependency>

Here's the error I'm getting from the test when running on jenkins: 11:22:35
11:22:35 . _ _ 11:22:35 /\ / '_ () \ \ \ \ 11:22:35 ( ( )\ | ' | '| | ' \/ ` | \ \ \ \ 11:22:35 \/ _)| |)| | | | | || (| | ) ) ) ) 11:22:35 ' |__| ._|| ||| |_, | / / / / 11:22:35 =========|_|==============|__/=//// 11:22:35 :: Spring Boot :: (v2.1.4.RELEASE) 11:22:35
11:22:35 2019-04-26 18:22:35.118 INFO 18756 --- [ main] .l.RetentionEventListenerIntegrationTest : Starting RetentionEventListenerIntegrationTest on with PID 18756 (started by jenkins in /var/lib/jenkins/workspace/mdh-retention-enforcer) 11:22:35 2019-04-26 18:22:35.118 INFO 18756 --- [ main] .l.RetentionEventListenerIntegrationTest : No active profile set, falling back to default profiles: default 11:22:35 2019-04-26 18:22:35.729 INFO 18756 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data repositories in DEFAULT mode. 11:22:35 2019-04-26 18:22:35.734 INFO 18756 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 5ms. Found 0 repository interfaces. 11:22:35 2019-04-26 18:22:35.800 INFO 18756 --- [ main] EmbeddedPostgresContextCustomizerFactory : Replacing 'dataSource' DataSource bean with embedded version 11:22:36 2019-04-26 18:22:35.969 INFO 18756 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.kafka.annotation.KafkaBootstrapConfiguration' of type [org.springframework.kafka.annotation.KafkaBootstrapConfiguration$$EnhancerBySpringCGLIB$$b0685c37] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 11:22:36 2019-04-26 18:22:36.062 INFO 18756 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$dcb64ab4] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 11:22:36 2019-04-26 18:22:36.162 ERROR 18756 --- [ main] wayEmbeddedPostgresDataSourceFactoryBean : Unexpected error during the initialization of embedded database 11:22:36
11:22:36 java.util.concurrent.CompletionException: com.google.common.util.concurrent.UncheckedExecutionException: java.lang.IllegalStateException: Process [/tmp/embedded-pg/PG-7010611ea87e721fb4b2e2a8657cce54/bin/initdb, -A, trust, -U, postgres, -D, /tmp/epg3169506516631789369, -E, UTF-8] failed 11:22:36
11:22:36 at io.zonky.test.db.flyway.DefaultFlywayDataSourceContext.lambda$reload$0(DefaultFlywayDataSourceContext.java:113) ~[embedded-database-spring-test-1.4.1.jar:na] 11:22:36 at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:602) ~[na:1.8.0_191] 11:22:36 at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:577) ~[na:1.8.0_191] 11:22:36 at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:442) ~[na:1.8.0_191] 11:22:36 at java.util.concurrent.CompletableFuture$UniCompletion.claim(CompletableFuture.java:529) ~[na:1.8.0_191] 11:22:36 at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:599) ~[na:1.8.0_191] 11:22:36 at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:577) ~[na:1.8.0_191] 11:22:36 at java.util.concurrent.CompletableFuture.uniApplyStage(CompletableFuture.java:617) ~[na:1.8.0_191] 11:22:36 at java.util.concurrent.CompletableFuture.thenApplyAsync(CompletableFuture.java:1993) ~[na:1.8.0_191] 11:22:36 at io.zonky.test.db.flyway.DefaultFlywayDataSourceContext.reload(DefaultFlywayDataSourceContext.java:106) ~[embedded-database-spring-test-1.4.1.jar:na] 11:22:36 at io.zonky.test.db.postgres.FlywayEmbeddedPostgresDataSourceFactoryBean.postProcessBeforeInitialization(FlywayEmbeddedPostgresDataSourceFactoryBean.java:89) ~[embedded-database-spring-test-1.4.1.jar:na] 11:22:36 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:414) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1770) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:307) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1105) ~[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867) ~[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549) ~[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775) ~[spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE] 11:22:36 at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) ~[spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE] 11:22:36 at org.springframework.boot.SpringApplication.run(SpringApplication.java:316) ~[spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE] 11:22:36 at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:127) ~[spring-boot-test-2.1.4.RELEASE.jar:2.1.4.RELEASE] 11:22:36 at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:99) ~[spring-test-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:117) ~[spring-test-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:108) ~[spring-test-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.test.context.web.ServletTestExecutionListener.setUpRequestContextIfNecessary(ServletTestExecutionListener.java:190) ~[spring-test-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.test.context.web.ServletTestExecutionListener.prepareTestInstance(ServletTestExecutionListener.java:132) ~[spring-test-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:246) ~[spring-test-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:227) ~[spring-test-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:289) ~[spring-test-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) ~[junit-4.12.jar:4.12] 11:22:36 at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:291) ~[spring-test-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:246) ~[spring-test-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:97) ~[spring-test-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) ~[junit-4.12.jar:4.12] 11:22:36 at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) ~[junit-4.12.jar:4.12] 11:22:36 at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) ~[junit-4.12.jar:4.12] 11:22:36 at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) ~[junit-4.12.jar:4.12] 11:22:36 at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) ~[junit-4.12.jar:4.12] 11:22:36 at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) ~[junit-4.12.jar:4.12] 11:22:36 at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) ~[spring-test-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) ~[junit-4.12.jar:4.12] 11:22:36 at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70) ~[spring-test-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48) ~[junit-4.12.jar:4.12] 11:22:36 at org.junit.rules.RunRules.evaluate(RunRules.java:20) ~[junit-4.12.jar:4.12] 11:22:36 at org.junit.runners.ParentRunner.run(ParentRunner.java:363) ~[junit-4.12.jar:4.12] 11:22:36 at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:190) ~[spring-test-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365) ~[surefire-junit4-2.22.1.jar:2.22.1] 11:22:36 at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273) ~[surefire-junit4-2.22.1.jar:2.22.1] 11:22:36 at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238) ~[surefire-junit4-2.22.1.jar:2.22.1] 11:22:36 at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159) ~[surefire-junit4-2.22.1.jar:2.22.1] 11:22:36 at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384) ~[surefire-booter-2.22.1.jar:2.22.1] 11:22:36 at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345) ~[surefire-booter-2.22.1.jar:2.22.1] 11:22:36 at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126) ~[surefire-booter-2.22.1.jar:2.22.1] 11:22:36 at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418) ~[surefire-booter-2.22.1.jar:2.22.1] 11:22:36 Caused by: com.google.common.util.concurrent.UncheckedExecutionException: java.lang.IllegalStateException: Process [/tmp/embedded-pg/PG-7010611ea87e721fb4b2e2a8657cce54/bin/initdb, -A, trust, -U, postgres, -D, /tmp/epg3169506516631789369, -E, UTF-8] failed 11:22:36
11:22:36 at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2050) ~[guava-27.0.1-jre.jar:na] 11:22:36 at com.google.common.cache.LocalCache.get(LocalCache.java:3952) ~[guava-27.0.1-jre.jar:na] 11:22:36 at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3974) ~[guava-27.0.1-jre.jar:na] 11:22:36 at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4958) ~[guava-27.0.1-jre.jar:na] 11:22:36 at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:4964) ~[guava-27.0.1-jre.jar:na] 11:22:36 at io.zonky.test.db.provider.impl.ZonkyPostgresDatabaseProvider.getDatabase(ZonkyPostgresDatabaseProvider.java:92) ~[embedded-database-spring-test-1.4.1.jar:na] 11:22:36 at io.zonky.test.db.provider.impl.PrefetchingDatabaseProvider$PrefetchingTask.lambda$new$0(PrefetchingDatabaseProvider.java:252) ~[embedded-database-spring-test-1.4.1.jar:na] 11:22:36 at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_191] 11:22:36 at io.zonky.test.db.provider.impl.PrefetchingDatabaseProvider$PrefetchingTask.run(PrefetchingDatabaseProvider.java:259) ~[embedded-database-spring-test-1.4.1.jar:na] 11:22:36 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_191] 11:22:36 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_191] 11:22:36 at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_191] 11:22:36 Caused by: java.lang.IllegalStateException: Process [/tmp/embedded-pg/PG-7010611ea87e721fb4b2e2a8657cce54/bin/initdb, -A, trust, -U, postgres, -D, /tmp/epg3169506516631789369, -E, UTF-8] failed 11:22:36
11:22:36 at io.zonky.test.db.postgres.embedded.EmbeddedPostgres.system(EmbeddedPostgres.java:624) ~[embedded-postgres-1.2.3.jar:na] 11:22:36 at io.zonky.test.db.postgres.embedded.EmbeddedPostgres.initdb(EmbeddedPostgres.java:243) ~[embedded-postgres-1.2.3.jar:na] 11:22:36 at io.zonky.test.db.postgres.embedded.EmbeddedPostgres.(EmbeddedPostgres.java:156) ~[embedded-postgres-1.2.3.jar:na] 11:22:36 at io.zonky.test.db.postgres.embedded.EmbeddedPostgres$Builder.start(EmbeddedPostgres.java:577) ~[embedded-postgres-1.2.3.jar:na] 11:22:36 at io.zonky.test.db.provider.impl.ZonkyPostgresDatabaseProvider$DatabaseInstance.(ZonkyPostgresDatabaseProvider.java:127) ~[embedded-database-spring-test-1.4.1.jar:na] 11:22:36 at io.zonky.test.db.provider.impl.ZonkyPostgresDatabaseProvider$DatabaseInstance.(ZonkyPostgresDatabaseProvider.java:111) ~[embedded-database-spring-test-1.4.1.jar:na] 11:22:36 at io.zonky.test.db.provider.impl.ZonkyPostgresDatabaseProvider$1.load(ZonkyPostgresDatabaseProvider.java:59) ~[embedded-database-spring-test-1.4.1.jar:na] 11:22:36 at io.zonky.test.db.provider.impl.ZonkyPostgresDatabaseProvider$1.load(ZonkyPostgresDatabaseProvider.java:57) ~[embedded-database-spring-test-1.4.1.jar:na] 11:22:36 at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3528) ~[guava-27.0.1-jre.jar:na] 11:22:36 at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2277) ~[guava-27.0.1-jre.jar:na] 11:22:36 at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2154) ~[guava-27.0.1-jre.jar:na] 11:22:36 at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2044) ~[guava-27.0.1-jre.jar:na] 11:22:36 ... 11 common frames omitted 11:22:36
11:22:36 2019-04-26 18:22:36.187 DEBUG 18756 --- [ main] org.flywaydb.core.Flyway : Memory usage: 209 of 636M 11:22:36 2019-04-26 18:22:36.187 WARN 18756 --- [ main] o.s.w.c.s.GenericWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayInitializer' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Unexpected error occurred while initializing the data source 11:22:36 2019-04-26 18:22:36.206 INFO 18756 --- [itdb:pid(18894)] i.z.t.d.p.embedded.EmbeddedPostgres : The files belonging to this database system will be owned by user "jenkins". 11:22:36 2019-04-26 18:22:36.207 INFO 18756 --- [itdb:pid(18894)] i.z.t.d.p.embedded.EmbeddedPostgres : This user must also own the server process. 11:22:36 2019-04-26 18:22:36.211 INFO 18756 --- [ main] ConditionEvaluationReportLoggingListener : 11:22:36
11:22:36 Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 11:22:36 2019-04-26 18:22:36.214 ERROR 18756 --- [ main] o.s.boot.SpringApplication : Application run failed 11:22:36
11:22:36 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayInitializer' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Unexpected error occurred while initializing the data source 11:22:36 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1778) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:307) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1105) ~[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867) ~[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549) ~[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775) ~[spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE] 11:22:36 at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) ~[spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE] 11:22:36 at org.springframework.boot.SpringApplication.run(SpringApplication.java:316) ~[spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE] 11:22:36 at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:127) [spring-boot-test-2.1.4.RELEASE.jar:2.1.4.RELEASE] 11:22:36 at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:99) [spring-test-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:117) [spring-test-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:108) [spring-test-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.test.context.web.ServletTestExecutionListener.setUpRequestContextIfNecessary(ServletTestExecutionListener.java:190) [spring-test-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.test.context.web.ServletTestExecutionListener.prepareTestInstance(ServletTestExecutionListener.java:132) [spring-test-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:246) [spring-test-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:227) [spring-test-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:289) [spring-test-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) [junit-4.12.jar:4.12] 11:22:36 at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:291) [spring-test-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:246) [spring-test-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:97) [spring-test-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) [junit-4.12.jar:4.12] 11:22:36 at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) [junit-4.12.jar:4.12] 11:22:36 at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) [junit-4.12.jar:4.12] 11:22:36 at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) [junit-4.12.jar:4.12] 11:22:36 at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) [junit-4.12.jar:4.12] 11:22:36 at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) [junit-4.12.jar:4.12] 11:22:36 at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) [spring-test-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) [junit-4.12.jar:4.12] 11:22:36 at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70) [spring-test-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48) [junit-4.12.jar:4.12] 11:22:36 at org.junit.rules.RunRules.evaluate(RunRules.java:20) [junit-4.12.jar:4.12] 11:22:36 at org.junit.runners.ParentRunner.run(ParentRunner.java:363) [junit-4.12.jar:4.12] 11:22:36 at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:190) [spring-test-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365) [surefire-junit4-2.22.1.jar:2.22.1] 11:22:36 at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273) [surefire-junit4-2.22.1.jar:2.22.1] 11:22:36 at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238) [surefire-junit4-2.22.1.jar:2.22.1] 11:22:36 at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159) [surefire-junit4-2.22.1.jar:2.22.1] 11:22:36 at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384) [surefire-booter-2.22.1.jar:2.22.1] 11:22:36 at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345) [surefire-booter-2.22.1.jar:2.22.1] 11:22:36 at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126) [surefire-booter-2.22.1.jar:2.22.1] 11:22:36 at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418) [surefire-booter-2.22.1.jar:2.22.1] 11:22:36 Caused by: java.lang.IllegalStateException: Unexpected error occurred while initializing the data source 11:22:36 at com.google.common.base.Preconditions.checkState(Preconditions.java:507) ~[guava-27.0.1-jre.jar:na] 11:22:36 at io.zonky.test.db.flyway.DefaultFlywayDataSourceContext.getTarget(DefaultFlywayDataSourceContext.java:88) ~[embedded-database-spring-test-1.4.1.jar:na] 11:22:36 at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:193) ~[spring-aop-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at com.sun.proxy.$Proxy85.getConnection(Unknown Source) ~[na:na] 11:22:36 at org.flywaydb.core.internal.jdbc.JdbcUtils.openConnection(JdbcUtils.java:56) ~[flyway-core-5.2.4.jar:na] 11:22:36 at org.flywaydb.core.internal.database.DatabaseFactory.createDatabase(DatabaseFactory.java:72) ~[flyway-core-5.2.4.jar:na] 11:22:36 at org.flywaydb.core.Flyway.execute(Flyway.java:1670) ~[flyway-core-5.2.4.jar:na] 11:22:36 at org.flywaydb.core.Flyway.migrate(Flyway.java:1356) ~[flyway-core-5.2.4.jar:na] 11:22:36 at org.springframework.boot.autoconfigure.flyway.FlywayMigrationInitializer.afterPropertiesSet(FlywayMigrationInitializer.java:66) ~[spring-boot-autoconfigure-2.1.4.RELEASE.jar:2.1.4.RELEASE] 11:22:36 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1837) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1774) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 ... 48 common frames omitted 11:22:36
11:22:36 2019-04-26 18:22:36.215 ERROR 18756 --- [ main] o.s.test.context.TestContextManager : Caught exception while allowing TestExecutionListener [org.springframework.test.context.web.ServletTestExecutionListener@101cf747] to prepare test instance [com.marchex.datahub.listeners.RetentionEventListenerIntegrationTest@3e5c7588] 11:22:36
11:22:36 java.lang.IllegalStateException: Failed to load ApplicationContext 11:22:36 at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:125) ~[spring-test-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:108) ~[spring-test-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.test.context.web.ServletTestExecutionListener.setUpRequestContextIfNecessary(ServletTestExecutionListener.java:190) ~[spring-test-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.test.context.web.ServletTestExecutionListener.prepareTestInstance(ServletTestExecutionListener.java:132) ~[spring-test-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:246) ~[spring-test-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:227) [spring-test-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:289) [spring-test-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) [junit-4.12.jar:4.12] 11:22:36 at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:291) [spring-test-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:246) [spring-test-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:97) [spring-test-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) [junit-4.12.jar:4.12] 11:22:36 at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) [junit-4.12.jar:4.12] 11:22:36 at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) [junit-4.12.jar:4.12] 11:22:36 at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) [junit-4.12.jar:4.12] 11:22:36 at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) [junit-4.12.jar:4.12] 11:22:36 at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) [junit-4.12.jar:4.12] 11:22:36 at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) [spring-test-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) [junit-4.12.jar:4.12] 11:22:36 at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70) [spring-test-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48) [junit-4.12.jar:4.12] 11:22:36 at org.junit.rules.RunRules.evaluate(RunRules.java:20) [junit-4.12.jar:4.12] 11:22:36 at org.junit.runners.ParentRunner.run(ParentRunner.java:363) [junit-4.12.jar:4.12] 11:22:36 at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:190) [spring-test-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365) [surefire-junit4-2.22.1.jar:2.22.1] 11:22:36 at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273) [surefire-junit4-2.22.1.jar:2.22.1] 11:22:36 at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238) [surefire-junit4-2.22.1.jar:2.22.1] 11:22:36 at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159) [surefire-junit4-2.22.1.jar:2.22.1] 11:22:36 at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384) [surefire-booter-2.22.1.jar:2.22.1] 11:22:36 at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345) [surefire-booter-2.22.1.jar:2.22.1] 11:22:36 at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126) [surefire-booter-2.22.1.jar:2.22.1] 11:22:36 at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418) [surefire-booter-2.22.1.jar:2.22.1] 11:22:36 Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayInitializer' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Unexpected error occurred while initializing the data source 11:22:36 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1778) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:307) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1105) ~[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867) ~[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549) ~[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775) ~[spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE] 11:22:36 at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) ~[spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE] 11:22:36 at org.springframework.boot.SpringApplication.run(SpringApplication.java:316) ~[spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE] 11:22:36 at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:127) ~[spring-boot-test-2.1.4.RELEASE.jar:2.1.4.RELEASE] 11:22:36 at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:99) ~[spring-test-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:117) ~[spring-test-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 ... 31 common frames omitted 11:22:36 Caused by: java.lang.IllegalStateException: Unexpected error occurred while initializing the data source 11:22:36 at com.google.common.base.Preconditions.checkState(Preconditions.java:507) ~[guava-27.0.1-jre.jar:na] 11:22:36 at io.zonky.test.db.flyway.DefaultFlywayDataSourceContext.getTarget(DefaultFlywayDataSourceContext.java:88) ~[embedded-database-spring-test-1.4.1.jar:na] 11:22:36 at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:193) ~[spring-aop-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at com.sun.proxy.$Proxy85.getConnection(Unknown Source) ~[na:na] 11:22:36 at org.flywaydb.core.internal.jdbc.JdbcUtils.openConnection(JdbcUtils.java:56) ~[flyway-core-5.2.4.jar:na] 11:22:36 at org.flywaydb.core.internal.database.DatabaseFactory.createDatabase(DatabaseFactory.java:72) ~[flyway-core-5.2.4.jar:na] 11:22:36 at org.flywaydb.core.Flyway.execute(Flyway.java:1670) ~[flyway-core-5.2.4.jar:na] 11:22:36 at org.flywaydb.core.Flyway.migrate(Flyway.java:1356) ~[flyway-core-5.2.4.jar:na] 11:22:36 at org.springframework.boot.autoconfigure.flyway.FlywayMigrationInitializer.afterPropertiesSet(FlywayMigrationInitializer.java:66) ~[spring-boot-autoconfigure-2.1.4.RELEASE.jar:2.1.4.RELEASE] 11:22:36 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1837) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1774) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE] 11:22:36 ... 48 common frames omitted 11:22:36

Thanks for taking a look! Jane

tomix26 commented 5 years ago

Hi, thanks for the question. Try to remove /tmp/embedded-pg/PG-7010611ea87e721fb4b2e2a8657cce54 directory. That should solve the problem.

janeliu commented 5 years ago

@tomix26 thanks for your response. We deleted the /tmp/embedded-pg/PG-7010611ea87e721fb4b2e2a8657cce54 in the jenkins server but it doesn't fix the issue. However, when we run the mvn build command directly on the server it does pass. We'll dig into the difference between the UI jenkins config and server config as the next step.

tomix26 commented 5 years ago

Any progress? Maybe it could be a permission issue, couldn't it?

janeliu commented 5 years ago

@tomix26 thanks for following up. We added provider = DOCKER to make it a docker image of the postgres and that fixed it.

tomix26 commented 5 years ago

Thanks for the reply. I'm closing the issue for now, but feel free to reopen it if needed.

jevanio commented 4 years ago

@tomix26 thanks for following up. We added provider = DOCKER to make it a docker image of the postgres and that fixed it.

Hey, I think I'm facing the same issue. Where did you add 'provider = DOCKER' to make it work?

Wobbley commented 4 years ago

Wondering the same thing.

I added @AutoConfigureEmbeddedDatabase(provider = DOCKER) and the required import as described by the README.MD but it's still failing with:

no.ruter.dpi.vvs.config.StateMachineConfigurationTest > initializationError FAILED
    java.lang.IllegalStateException
        Caused by: org.springframework.beans.factory.BeanCreationException
            Caused by: java.lang.IllegalStateException

no.ruter.dpi.vvs.repository.JpaRepositoriesTest > initializationError FAILED
    java.lang.IllegalStateException
        Caused by: org.springframework.beans.factory.BeanCreationException
            Caused by: java.lang.IllegalStateException
tomix26 commented 4 years ago

@Wobbley Could you please provide a full log?

Wobbley commented 4 years ago

@tomix26 I got sidetracked but did more digging and enabled debug mode. This looks like something:

#14 73.01 2020-04-07T18:50:53.792+0000 [DEBUG] [TestEventLogger]     2020-04-07 18:50:53.792  INFO 69 --- [initdb:pid(111)] i.z.t.d.p.embedded.EmbeddedPostgres      : initdb: cannot be run as root
#14 73.01 2020-04-07T18:50:53.800+0000 [DEBUG] [TestEventLogger]     2020-04-07 18:50:53.792  INFO 69 --- [initdb:pid(111)] i.z.t.d.p.embedded.EmbeddedPostgres      : Please log in (using, e.g., "su") as the (unprivileged) user that will
#14 73.01 2020-04-07T18:50:53.800+0000 [DEBUG] [TestEventLogger]     2020-04-07 18:50:53.799  INFO 69 --- [initdb:pid(111)] i.z.t.d.p.embedded.EmbeddedPostgres      : own the server process.

We really only have one Jenkins user on is there a way around this? I guess I can just create a new user in the dockerfile.

I included the rest of the log, it's huge and bout it's relevant but I decided to include it all in case this is not the issue.

#14 70.26 
#14 70.26       .   ____          _            __ _ _
#14 70.26      /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
#14 70.26     ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
#14 70.26      \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
#14 70.26       '  |____| .__|_| |_|_| |_\__, | / / / /
#14 70.26      =========|_|==============|___/=/_/_/_/
#14 70.26      :: Spring Boot ::        (v2.2.6.RELEASE)
#14 70.26 
#14 70.46     2020-04-07 18:47:53.241  INFO 69 --- [    Test worker] n.r.d.v.c.StateMachineConfigurationTest  : Starting StateMachineConfigurationTest on buildkitsandbox with PID 69 (started by root in /)
#14 70.46     2020-04-07 18:47:53.246  INFO 69 --- [    Test worker] n.r.d.v.c.StateMachineConfigurationTest  : The following profiles are active: mockServices
#14 72.06     2020-04-07 18:47:54.842  INFO 69 --- [    Test worker] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
#14 72.16     2020-04-07 18:47:54.975  INFO 69 --- [    Test worker] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 121ms. Found 5 JPA repository interfaces.
#14 72.26     2020-04-07 18:47:55.071  INFO 69 --- [    Test worker] EmbeddedPostgresContextCustomizerFactory : Replacing 'dataSource' DataSource bean with embedded version
#14 72.76     2020-04-07 18:47:55.616  INFO 69 --- [    Test worker] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.statemachine.config.configuration.StateMachineAnnotationPostProcessorConfiguration' of type [org.springframework.statemachine.config.configuration.StateMachineAnnotationPostProcessorConfiguration$$EnhancerBySpringCGLIB$$2f9eb639] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
#14 72.96     2020-04-07 18:47:55.772  INFO 69 --- [    Test worker] eProvider$PriorityThreadPoolTaskExecutor : Initializing ExecutorService
#14 73.16     2020-04-07 18:47:55.922  INFO 69 --- [  prefetching-1] i.z.t.d.p.embedded.EmbeddedPostgres      : Detected a Linux x86_64 system
#14 73.16     2020-04-07 18:47:55.941  INFO 69 --- [  prefetching-1] .z.t.d.p.e.DefaultPostgresBinaryResolver : Detected distribution: 'Debian'
#14 73.16     2020-04-07 18:47:55.945  INFO 69 --- [  prefetching-1] .z.t.d.p.e.DefaultPostgresBinaryResolver : System specific postgres binaries found: postgres-linux-x86_64.txz
#14 73.26     2020-04-07 18:47:56.036  INFO 69 --- [  prefetching-1] i.z.t.d.p.embedded.EmbeddedPostgres      : Extracting Postgres...
#14 75.26     2020-04-07 18:47:58.090  INFO 69 --- [  prefetching-1] i.z.t.d.p.embedded.EmbeddedPostgres      : Postgres binaries at /tmp/embedded-pg/PG-a8263178df5b3591feca6b619939c2bb
#14 75.26     2020-04-07 18:47:58.102  INFO 69 --- [initdb:pid(112)] i.z.t.d.p.embedded.EmbeddedPostgres      : initdb: cannot be run as root
#14 75.26     2020-04-07 18:47:58.104  INFO 69 --- [initdb:pid(112)] i.z.t.d.p.embedded.EmbeddedPostgres      : Please log in (using, e.g., "su") as the (unprivileged) user that will
#14 75.26     2020-04-07 18:47:58.105  INFO 69 --- [initdb:pid(112)] i.z.t.d.p.embedded.EmbeddedPostgres      : own the server process.
#14 75.26     2020-04-07 18:47:58.112 ERROR 69 --- [    Test worker] wayEmbeddedPostgresDataSourceFactoryBean : Unexpected error during the initialization of embedded database
#14 75.36 
#14 75.36     java.util.concurrent.CompletionException: com.google.common.util.concurrent.UncheckedExecutionException: java.lang.IllegalStateException: Process [/tmp/embedded-pg/PG-a8263178df5b3591feca6b619939c2bb/bin/initdb, -A, trust, -U, postgres, -D, /tmp/epg3881361417977083194, -E, UTF-8] failed
#14 75.36       at io.zonky.test.db.flyway.DefaultFlywayDataSourceContext.lambda$reload$0(DefaultFlywayDataSourceContext.java:113) ~[embedded-database-spring-test-1.5.3.jar:na]
#14 75.36       at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:642) ~[na:na]
#14 75.36       at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:478) ~[na:na]
#14 75.36       at java.base/java.util.concurrent.CompletableFuture.uniApplyNow(CompletableFuture.java:677) ~[na:na]
#14 75.37       at java.base/java.util.concurrent.CompletableFuture.uniApplyStage(CompletableFuture.java:658) ~[na:na]
#14 75.37       at java.base/java.util.concurrent.CompletableFuture.thenApplyAsync(CompletableFuture.java:2104) ~[na:na]
#14 75.37       at io.zonky.test.db.flyway.DefaultFlywayDataSourceContext.reload(DefaultFlywayDataSourceContext.java:106) ~[embedded-database-spring-test-1.5.3.jar:na]
#14 75.37       at io.zonky.test.db.postgres.FlywayEmbeddedPostgresDataSourceFactoryBean.postProcessBeforeInitialization(FlywayEmbeddedPostgresDataSourceFactoryBean.java:89) ~[embedded-database-spring-test-1.5.3.jar:na]
#14 75.37       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:416) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.37       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1788) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.37       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:595) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.37       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.37       at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.37       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.37       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.37       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.37       at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.37       at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1290) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.37       at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1210) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.37       at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:885) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.37       at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:789) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.37       at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:539) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.37       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1338) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.37       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.37       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.37       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.38       at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.38       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.38       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.38       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.38       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:310) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.38       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.38       at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1108) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.38       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:868) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.38       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.38       at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) ~[spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
#14 75.38       at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) ~[spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
#14 75.38       at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) ~[spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
#14 75.38       at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:126) ~[spring-boot-test-2.2.6.RELEASE.jar:2.2.6.RELEASE]
#14 75.38       at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:99) ~[spring-test-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.38       at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:124) ~[spring-test-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.38       at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:123) ~[spring-test-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.38       at io.zonky.test.db.flyway.OptimizedFlywayTestExecutionListener.optimizedDbReset(OptimizedFlywayTestExecutionListener.java:139) ~[embedded-database-spring-test-1.5.3.jar:na]
#14 75.38       at io.zonky.test.db.flyway.OptimizedFlywayTestExecutionListener.beforeTestClass(OptimizedFlywayTestExecutionListener.java:101) ~[embedded-database-spring-test-1.5.3.jar:na]
#14 75.38       at org.springframework.test.context.TestContextManager.beforeTestClass(TestContextManager.java:213) ~[spring-test-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.38       at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:60) ~[spring-test-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.38       at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70) ~[spring-test-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.38       at org.junit.runners.ParentRunner.run(ParentRunner.java:363) ~[junit-4.12.jar:4.12]
#14 75.39       at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:190) ~[spring-test-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.39       at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.runTestClass(JUnitTestClassExecutor.java:110) ~[na:na]
#14 75.39       at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:58) ~[na:na]
#14 75.39       at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:38) ~[na:na]
#14 75.39       at org.gradle.api.internal.tasks.testing.junit.AbstractJUnitTestClassProcessor.processTestClass(AbstractJUnitTestClassProcessor.java:62) ~[na:na]
#14 75.39       at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:51) ~[na:na]
#14 75.39       at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
#14 75.39       at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
#14 75.39       at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
#14 75.39       at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
#14 75.39       at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36) ~[na:na]
#14 75.39       at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24) ~[na:na]
#14 75.39       at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33) ~[na:na]
#14 75.39       at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94) ~[na:na]
#14 75.39       at com.sun.proxy.$Proxy2.processTestClass(Unknown Source) ~[na:na]
#14 75.39       at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:118) ~[na:na]
#14 75.39       at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
#14 75.39       at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
#14 75.39       at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
#14 75.39       at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
#14 75.39       at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36) ~[na:na]
#14 75.39       at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24) ~[na:na]
#14 75.40       at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:182) ~[na:na]
#14 75.40       at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:164) ~[na:na]
#14 75.40       at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:412) ~[na:na]
#14 75.40       at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64) ~[na:na]
#14 75.40       at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48) ~[na:na]
#14 75.40       at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
#14 75.40       at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
#14 75.40       at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56) ~[na:na]
#14 75.40       at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]
#14 75.40     Caused by: com.google.common.util.concurrent.UncheckedExecutionException: java.lang.IllegalStateException: Process [/tmp/embedded-pg/PG-a8263178df5b3591feca6b619939c2bb/bin/initdb, -A, trust, -U, postgres, -D, /tmp/epg3881361417977083194, -E, UTF-8] failed
#14 75.40       at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2218) ~[guava-23.0.jar:na]
#14 75.40       at com.google.common.cache.LocalCache.get(LocalCache.java:4147) ~[guava-23.0.jar:na]
#14 75.40       at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:4151) ~[guava-23.0.jar:na]
#14 75.40       at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:5140) ~[guava-23.0.jar:na]
#14 75.40       at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:5146) ~[guava-23.0.jar:na]
#14 75.40       at io.zonky.test.db.provider.impl.ZonkyPostgresDatabaseProvider.getDatabase(ZonkyPostgresDatabaseProvider.java:93) ~[embedded-database-spring-test-1.5.3.jar:na]
#14 75.40       at io.zonky.test.db.provider.impl.PrefetchingDatabaseProvider$PrefetchingTask.lambda$new$0(PrefetchingDatabaseProvider.java:252) ~[embedded-database-spring-test-1.5.3.jar:na]
#14 75.41       at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[na:na]
#14 75.41       at io.zonky.test.db.provider.impl.PrefetchingDatabaseProvider$PrefetchingTask.run(PrefetchingDatabaseProvider.java:259) ~[embedded-database-spring-test-1.5.3.jar:na]
#14 75.41       at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
#14 75.41       at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
#14 75.41       ... 1 common frames omitted
#14 75.41     Caused by: java.lang.IllegalStateException: Process [/tmp/embedded-pg/PG-a8263178df5b3591feca6b619939c2bb/bin/initdb, -A, trust, -U, postgres, -D, /tmp/epg3881361417977083194, -E, UTF-8] failed
#14 75.41       at io.zonky.test.db.postgres.embedded.EmbeddedPostgres.system(EmbeddedPostgres.java:631) ~[embedded-postgres-1.2.6.jar:na]
#14 75.41       at io.zonky.test.db.postgres.embedded.EmbeddedPostgres.initdb(EmbeddedPostgres.java:249) ~[embedded-postgres-1.2.6.jar:na]
#14 75.41       at io.zonky.test.db.postgres.embedded.EmbeddedPostgres.<init>(EmbeddedPostgres.java:156) ~[embedded-postgres-1.2.6.jar:na]
#14 75.41       at io.zonky.test.db.postgres.embedded.EmbeddedPostgres$Builder.start(EmbeddedPostgres.java:584) ~[embedded-postgres-1.2.6.jar:na]
#14 75.41       at io.zonky.test.db.provider.impl.ZonkyPostgresDatabaseProvider$DatabaseInstance.<init>(ZonkyPostgresDatabaseProvider.java:128) ~[embedded-database-spring-test-1.5.3.jar:na]
#14 75.41       at io.zonky.test.db.provider.impl.ZonkyPostgresDatabaseProvider$DatabaseInstance.<init>(ZonkyPostgresDatabaseProvider.java:112) ~[embedded-database-spring-test-1.5.3.jar:na]
#14 75.41       at io.zonky.test.db.provider.impl.ZonkyPostgresDatabaseProvider$1.load(ZonkyPostgresDatabaseProvider.java:59) ~[embedded-database-spring-test-1.5.3.jar:na]
#14 75.41       at io.zonky.test.db.provider.impl.ZonkyPostgresDatabaseProvider$1.load(ZonkyPostgresDatabaseProvider.java:57) ~[embedded-database-spring-test-1.5.3.jar:na]
#14 75.41       at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3708) ~[guava-23.0.jar:na]
#14 75.41       at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2416) ~[guava-23.0.jar:na]
#14 75.41       at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2299) ~[guava-23.0.jar:na]
#14 75.41       at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2212) ~[guava-23.0.jar:na]
#14 75.41       ... 11 common frames omitted
#14 75.41 
#14 75.41     2020-04-07 18:47:58.122  INFO 69 --- [    Test worker] o.f.c.internal.license.VersionPrinter    : Flyway Community Edition 6.3.2 by Redgate
#14 75.41     2020-04-07 18:47:58.130  WARN 69 --- [    Test worker] o.s.w.c.s.GenericWebApplicationContext   : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayInitializer' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Unexpected error occurred while initializing the data source
#14 75.41     2020-04-07 18:47:58.162  INFO 69 --- [    Test worker] ConditionEvaluationReportLoggingListener : 
#14 75.41 
#14 75.41     Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
#14 75.41     2020-04-07 18:47:58.181 ERROR 69 --- [    Test worker] o.s.boot.SpringApplication               : Application run failed
#14 75.41 
#14 75.41     org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayInitializer' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Unexpected error occurred while initializing the data source
#14 75.41       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.41       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:595) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.41       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.41       at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.41       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.41       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.41       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.41       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:310) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.41       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.41       at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1108) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.41       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:868) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.41       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.41       at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) ~[spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
#14 75.41       at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) ~[spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
#14 75.41       at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) ~[spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
#14 75.41       at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:126) ~[spring-boot-test-2.2.6.RELEASE.jar:2.2.6.RELEASE]
#14 75.41       at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:99) ~[spring-test-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.41       at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:124) ~[spring-test-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.41       at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:123) ~[spring-test-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.41       at io.zonky.test.db.flyway.OptimizedFlywayTestExecutionListener.optimizedDbReset(OptimizedFlywayTestExecutionListener.java:139) ~[embedded-database-spring-test-1.5.3.jar:na]
#14 75.41       at io.zonky.test.db.flyway.OptimizedFlywayTestExecutionListener.beforeTestClass(OptimizedFlywayTestExecutionListener.java:101) ~[embedded-database-spring-test-1.5.3.jar:na]
#14 75.41       at org.springframework.test.context.TestContextManager.beforeTestClass(TestContextManager.java:213) ~[spring-test-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.41       at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:60) ~[spring-test-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.41       at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70) ~[spring-test-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.41       at org.junit.runners.ParentRunner.run(ParentRunner.java:363) ~[junit-4.12.jar:4.12]
#14 75.41       at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:190) ~[spring-test-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.41       at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.runTestClass(JUnitTestClassExecutor.java:110) ~[na:na]
#14 75.41       at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:58) ~[na:na]
#14 75.41       at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:38) ~[na:na]
#14 75.41       at org.gradle.api.internal.tasks.testing.junit.AbstractJUnitTestClassProcessor.processTestClass(AbstractJUnitTestClassProcessor.java:62) ~[na:na]
#14 75.41       at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:51) ~[na:na]
#14 75.41       at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
#14 75.41       at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
#14 75.41       at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
#14 75.41       at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
#14 75.41       at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36) ~[na:na]
#14 75.41       at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24) ~[na:na]
#14 75.41       at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33) ~[na:na]
#14 75.41       at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94) ~[na:na]
#14 75.41       at com.sun.proxy.$Proxy2.processTestClass(Unknown Source) ~[na:na]
#14 75.41       at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:118) ~[na:na]
#14 75.41       at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
#14 75.41       at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
#14 75.41       at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
#14 75.41       at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
#14 75.41       at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36) ~[na:na]
#14 75.41       at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24) ~[na:na]
#14 75.41       at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:182) ~[na:na]
#14 75.41       at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:164) ~[na:na]
#14 75.41       at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:412) ~[na:na]
#14 75.41       at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64) ~[na:na]
#14 75.41       at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48) ~[na:na]
#14 75.41       at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
#14 75.41       at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
#14 75.41       at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56) ~[na:na]
#14 75.41       at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]
#14 75.41     Caused by: java.lang.IllegalStateException: Unexpected error occurred while initializing the data source
#14 75.41       at com.google.common.base.Preconditions.checkState(Preconditions.java:459) ~[guava-23.0.jar:na]
#14 75.41       at io.zonky.test.db.flyway.DefaultFlywayDataSourceContext.getTarget(DefaultFlywayDataSourceContext.java:88) ~[embedded-database-spring-test-1.5.3.jar:na]
#14 75.41       at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:192) ~[spring-aop-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.41       at com.sun.proxy.$Proxy129.getConnection(Unknown Source) ~[na:na]
#14 75.41       at org.flywaydb.core.internal.jdbc.JdbcUtils.openConnection(JdbcUtils.java:56) ~[flyway-core-6.3.2.jar:na]
#14 75.41       at org.flywaydb.core.internal.jdbc.JdbcConnectionFactory.<init>(JdbcConnectionFactory.java:80) ~[flyway-core-6.3.2.jar:na]
#14 75.41       at org.flywaydb.core.Flyway.execute(Flyway.java:449) ~[flyway-core-6.3.2.jar:na]
#14 75.41       at org.flywaydb.core.Flyway.migrate(Flyway.java:153) ~[flyway-core-6.3.2.jar:na]
#14 75.41       at org.springframework.boot.autoconfigure.flyway.FlywayMigrationInitializer.afterPropertiesSet(FlywayMigrationInitializer.java:65) ~[spring-boot-autoconfigure-2.2.6.RELEASE.jar:2.2.6.RELEASE]
#14 75.41       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1855) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.41       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1792) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.41       ... 55 common frames omitted
#14 75.41 
#14 75.46     2020-04-07 18:47:58.197  WARN 69 --- [    Test worker] o.s.test.context.TestContextManager      : Caught exception while invoking 'beforeTestClass' callback on TestExecutionListener [io.zonky.test.db.flyway.OptimizedFlywayTestExecutionListener@5a048338] for test class [class no.ruter.dpi.vvs.config.StateMachineConfigurationTest]
#14 75.46 
#14 75.46     java.lang.IllegalStateException: Failed to load ApplicationContext
#14 75.46       at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:132) ~[spring-test-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.46       at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:123) ~[spring-test-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.46       at io.zonky.test.db.flyway.OptimizedFlywayTestExecutionListener.optimizedDbReset(OptimizedFlywayTestExecutionListener.java:139) ~[embedded-database-spring-test-1.5.3.jar:na]
#14 75.46       at io.zonky.test.db.flyway.OptimizedFlywayTestExecutionListener.beforeTestClass(OptimizedFlywayTestExecutionListener.java:101) ~[embedded-database-spring-test-1.5.3.jar:na]
#14 75.46       at org.springframework.test.context.TestContextManager.beforeTestClass(TestContextManager.java:213) ~[spring-test-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.46       at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:60) ~[spring-test-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.47       at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70) ~[spring-test-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.47       at org.junit.runners.ParentRunner.run(ParentRunner.java:363) ~[junit-4.12.jar:4.12]
#14 75.47       at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:190) ~[spring-test-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.47       at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.runTestClass(JUnitTestClassExecutor.java:110) ~[na:na]
#14 75.47       at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:58) ~[na:na]
#14 75.47       at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:38) ~[na:na]
#14 75.47       at org.gradle.api.internal.tasks.testing.junit.AbstractJUnitTestClassProcessor.processTestClass(AbstractJUnitTestClassProcessor.java:62) ~[na:na]
#14 75.47       at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:51) ~[na:na]
#14 75.47       at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
#14 75.47       at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
#14 75.47       at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
#14 75.47       at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
#14 75.47       at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36) ~[na:na]
#14 75.47       at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24) ~[na:na]
#14 75.47       at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33) ~[na:na]
#14 75.47       at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94) ~[na:na]
#14 75.47       at com.sun.proxy.$Proxy2.processTestClass(Unknown Source) ~[na:na]
#14 75.47       at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:118) ~[na:na]
#14 75.47       at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
#14 75.47       at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
#14 75.47       at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
#14 75.47       at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
#14 75.47       at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36) ~[na:na]
#14 75.47       at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24) ~[na:na]
#14 75.47       at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:182) ~[na:na]
#14 75.47       at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:164) ~[na:na]
#14 75.47       at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:412) ~[na:na]
#14 75.47       at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64) ~[na:na]
#14 75.47       at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48) ~[na:na]
#14 75.47       at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
#14 75.47       at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
#14 75.47       at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56) ~[na:na]
#14 75.47       at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]
#14 75.47     Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayInitializer' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Unexpected error occurred while initializing the data source
#14 75.47       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.47       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:595) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.47       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.47       at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.47       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.47       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.47       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.47       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:310) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.47       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.47       at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1108) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.47       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:868) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.47       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.47       at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) ~[spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
#14 75.47       at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) ~[spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
#14 75.47       at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) ~[spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
#14 75.47       at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:126) ~[spring-boot-test-2.2.6.RELEASE.jar:2.2.6.RELEASE]
#14 75.47       at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:99) ~[spring-test-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.47       at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:124) ~[spring-test-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.47       ... 38 common frames omitted
#14 75.47     Caused by: java.lang.IllegalStateException: Unexpected error occurred while initializing the data source
#14 75.47       at com.google.common.base.Preconditions.checkState(Preconditions.java:459) ~[guava-23.0.jar:na]
#14 75.47       at io.zonky.test.db.flyway.DefaultFlywayDataSourceContext.getTarget(DefaultFlywayDataSourceContext.java:88) ~[embedded-database-spring-test-1.5.3.jar:na]
#14 75.47       at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:192) ~[spring-aop-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.47       at com.sun.proxy.$Proxy129.getConnection(Unknown Source) ~[na:na]
#14 75.47       at org.flywaydb.core.internal.jdbc.JdbcUtils.openConnection(JdbcUtils.java:56) ~[flyway-core-6.3.2.jar:na]
#14 75.47       at org.flywaydb.core.internal.jdbc.JdbcConnectionFactory.<init>(JdbcConnectionFactory.java:80) ~[flyway-core-6.3.2.jar:na]
#14 75.47       at org.flywaydb.core.Flyway.execute(Flyway.java:449) ~[flyway-core-6.3.2.jar:na]
#14 75.47       at org.flywaydb.core.Flyway.migrate(Flyway.java:153) ~[flyway-core-6.3.2.jar:na]
#14 75.47       at org.springframework.boot.autoconfigure.flyway.FlywayMigrationInitializer.afterPropertiesSet(FlywayMigrationInitializer.java:65) ~[spring-boot-autoconfigure-2.2.6.RELEASE.jar:2.2.6.RELEASE]
#14 75.47       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1855) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.47       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1792) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 75.47       ... 55 common frames omitted
#14 75.47 
#14 75.66 
#14 75.66 no.ruter.dpi.vvs.config.StateMachineConfigurationTest > classMethod FAILED
#14 75.66     java.lang.IllegalStateException: Failed to load ApplicationContext
#14 75.66 
#14 75.66         Caused by:
#14 75.66         org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayInitializer' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Unexpected error occurred while initializing the data source
#14 75.66 
#14 75.66             Caused by:
#14 75.66             java.lang.IllegalStateException: Unexpected error occurred while initializing the data source
#14 75.66 
#14 75.66 no.ruter.dpi.vvs.repository.JpaRepositoriesTest STANDARD_OUT
#14 75.66     2020-04-07 18:47:58.237  INFO 69 --- [    Test worker] b.t.a.o.j.DataJpaTestContextBootstrapper : Neither @ContextConfiguration nor @ContextHierarchy found for test class [no.ruter.dpi.vvs.repository.JpaRepositoriesTest], using SpringBootContextLoader
#14 75.66     2020-04-07 18:47:58.242  INFO 69 --- [    Test worker] o.s.t.c.support.AbstractContextLoader    : Could not detect default resource locations for test class [no.ruter.dpi.vvs.repository.JpaRepositoriesTest]: no resource found for suffixes {-context.xml, Context.groovy}.
#14 75.66     2020-04-07 18:47:58.243  INFO 69 --- [    Test worker] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [no.ruter.dpi.vvs.repository.JpaRepositoriesTest]: JpaRepositoriesTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration.
#14 75.66     2020-04-07 18:47:58.294  INFO 69 --- [    Test worker] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration no.ruter.dpi.vvs.VvsApplication for test class no.ruter.dpi.vvs.repository.JpaRepositoriesTest
#14 75.66     2020-04-07 18:47:58.295  INFO 69 --- [    Test worker] b.t.a.o.j.DataJpaTestContextBootstrapper : Loaded default TestExecutionListener class names from location [META-INF/spring.factories]: [io.zonky.test.db.flyway.OptimizedFlywayTestExecutionListener, org.springframework.boot.test.autoconfigure.restdocs.RestDocsTestExecutionListener, org.springframework.boot.test.autoconfigure.web.client.MockRestServiceServerResetTestExecutionListener, org.springframework.boot.test.autoconfigure.web.servlet.MockMvcPrintOnlyOnFailureTestExecutionListener, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverTestExecutionListener, org.springframework.boot.test.mock.mockito.MockitoTestExecutionListener, org.springframework.boot.test.mock.mockito.ResetMocksTestExecutionListener, org.springframework.test.context.web.ServletTestExecutionListener, org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener, org.springframework.test.context.support.DependencyInjectionTestExecutionListener, org.springframework.test.context.support.DirtiesContextTestExecutionListener, org.springframework.test.context.transaction.TransactionalTestExecutionListener, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener, org.springframework.test.context.event.EventPublishingTestExecutionListener]
#14 75.66     2020-04-07 18:47:58.296  INFO 69 --- [    Test worker] b.t.a.o.j.DataJpaTestContextBootstrapper : Using TestExecutionListeners: [org.springframework.test.context.web.ServletTestExecutionListener@257a73f7, org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener@1a666def, org.springframework.boot.test.mock.mockito.MockitoTestExecutionListener@5535aa4a, org.springframework.boot.test.autoconfigure.SpringBootDependencyInjectionTestExecutionListener@5519e0c3, org.springframework.test.context.support.DirtiesContextTestExecutionListener@230ac45c, io.zonky.test.db.flyway.OptimizedFlywayTestExecutionListener@a2accc7, org.springframework.test.context.transaction.TransactionalTestExecutionListener@72b54032, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener@6830a95f, org.springframework.test.context.event.EventPublishingTestExecutionListener@1dedb821, org.springframework.boot.test.autoconfigure.restdocs.RestDocsTestExecutionListener@417d03af, org.springframework.boot.test.autoconfigure.web.client.MockRestServiceServerResetTestExecutionListener@19117f62, org.springframework.boot.test.autoconfigure.web.servlet.MockMvcPrintOnlyOnFailureTestExecutionListener@7406574e, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverTestExecutionListener@45ac55f, org.springframework.boot.test.mock.mockito.ResetMocksTestExecutionListener@2d13de00]
#14 75.66 
#14 75.66       .   ____          _            __ _ _
#14 75.66      /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
#14 75.66     ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
#14 75.66      \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
#14 75.66       '  |____| .__|_| |_|_| |_\__, | / / / /
#14 75.66      =========|_|==============|___/=/_/_/_/
#14 75.66      :: Spring Boot ::        (v2.2.6.RELEASE)
#14 75.66 
#14 75.66     2020-04-07 18:47:58.450  INFO 69 --- [    Test worker] n.r.d.v.repository.JpaRepositoriesTest   : Starting JpaRepositoriesTest on buildkitsandbox with PID 69 (started by root in /)
#14 75.66     2020-04-07 18:47:58.452  INFO 69 --- [    Test worker] n.r.d.v.repository.JpaRepositoriesTest   : No active profile set, falling back to default profiles: default
#14 75.86     2020-04-07 18:47:58.628  INFO 69 --- [    Test worker] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
#14 75.86     2020-04-07 18:47:58.668  INFO 69 --- [    Test worker] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 39ms. Found 5 JPA repository interfaces.
#14 75.86     2020-04-07 18:47:58.696  INFO 69 --- [    Test worker] EmbeddedPostgresContextCustomizerFactory : Replacing 'dataSource' DataSource bean with embedded version
#14 76.06     2020-04-07 18:47:58.865 ERROR 69 --- [    Test worker] wayEmbeddedPostgresDataSourceFactoryBean : Unexpected error during the initialization of embedded database
#14 76.06 
#14 76.06     java.util.concurrent.CompletionException: com.google.common.util.concurrent.UncheckedExecutionException: java.lang.IllegalStateException: Process [/tmp/embedded-pg/PG-a8263178df5b3591feca6b619939c2bb/bin/initdb, -A, trust, -U, postgres, -D, /tmp/epg3881361417977083194, -E, UTF-8] failed
#14 76.06       at io.zonky.test.db.flyway.DefaultFlywayDataSourceContext.lambda$reload$0(DefaultFlywayDataSourceContext.java:113) ~[embedded-database-spring-test-1.5.3.jar:na]
#14 76.06       at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:642) ~[na:na]
#14 76.06       at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:478) ~[na:na]
#14 76.06       at java.base/java.util.concurrent.CompletableFuture.uniApplyNow(CompletableFuture.java:677) ~[na:na]
#14 76.06       at java.base/java.util.concurrent.CompletableFuture.uniApplyStage(CompletableFuture.java:658) ~[na:na]
#14 76.06       at java.base/java.util.concurrent.CompletableFuture.thenApplyAsync(CompletableFuture.java:2104) ~[na:na]
#14 76.06       at io.zonky.test.db.flyway.DefaultFlywayDataSourceContext.reload(DefaultFlywayDataSourceContext.java:106) ~[embedded-database-spring-test-1.5.3.jar:na]
#14 76.06       at io.zonky.test.db.postgres.FlywayEmbeddedPostgresDataSourceFactoryBean.postProcessBeforeInitialization(FlywayEmbeddedPostgresDataSourceFactoryBean.java:89) ~[embedded-database-spring-test-1.5.3.jar:na]
#14 76.06       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:416) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.06       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1788) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.06       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:595) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.06       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.06       at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.06       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.06       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.06       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.06       at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.06       at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1290) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.06       at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1210) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.06       at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:885) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.06       at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:789) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.06       at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:539) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.06       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1338) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.06       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.06       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.06       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.06       at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.06       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.06       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.06       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.06       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:310) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.06       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.06       at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1108) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.06       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:868) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.06       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.06       at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) ~[spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
#14 76.06       at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) ~[spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
#14 76.06       at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) ~[spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
#14 76.06       at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:126) ~[spring-boot-test-2.2.6.RELEASE.jar:2.2.6.RELEASE]
#14 76.06       at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:99) ~[spring-test-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.06       at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:124) ~[spring-test-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.06       at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:123) ~[spring-test-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.06       at io.zonky.test.db.flyway.OptimizedFlywayTestExecutionListener.optimizedDbReset(OptimizedFlywayTestExecutionListener.java:139) ~[embedded-database-spring-test-1.5.3.jar:na]
#14 76.06       at io.zonky.test.db.flyway.OptimizedFlywayTestExecutionListener.beforeTestClass(OptimizedFlywayTestExecutionListener.java:101) ~[embedded-database-spring-test-1.5.3.jar:na]
#14 76.07       at org.springframework.test.context.TestContextManager.beforeTestClass(TestContextManager.java:213) ~[spring-test-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.07       at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:60) ~[spring-test-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.07       at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70) ~[spring-test-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.07       at org.junit.runners.ParentRunner.run(ParentRunner.java:363) ~[junit-4.12.jar:4.12]
#14 76.07       at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:190) ~[spring-test-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.07       at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.runTestClass(JUnitTestClassExecutor.java:110) ~[na:na]
#14 76.07       at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:58) ~[na:na]
#14 76.07       at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:38) ~[na:na]
#14 76.07       at org.gradle.api.internal.tasks.testing.junit.AbstractJUnitTestClassProcessor.processTestClass(AbstractJUnitTestClassProcessor.java:62) ~[na:na]
#14 76.07       at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:51) ~[na:na]
#14 76.07       at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
#14 76.07       at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
#14 76.07       at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
#14 76.07       at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
#14 76.07       at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36) ~[na:na]
#14 76.07       at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24) ~[na:na]
#14 76.07       at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33) ~[na:na]
#14 76.07       at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94) ~[na:na]
#14 76.07       at com.sun.proxy.$Proxy2.processTestClass(Unknown Source) ~[na:na]
#14 76.07       at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:118) ~[na:na]
#14 76.07       at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
#14 76.07       at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
#14 76.07       at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
#14 76.07       at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
#14 76.07       at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36) ~[na:na]
#14 76.07       at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24) ~[na:na]
#14 76.07       at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:182) ~[na:na]
#14 76.07       at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:164) ~[na:na]
#14 76.07       at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:412) ~[na:na]
#14 76.07       at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64) ~[na:na]
#14 76.07       at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48) ~[na:na]
#14 76.07       at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
#14 76.07       at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
#14 76.07       at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56) ~[na:na]
#14 76.07       at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]
#14 76.07     Caused by: com.google.common.util.concurrent.UncheckedExecutionException: java.lang.IllegalStateException: Process [/tmp/embedded-pg/PG-a8263178df5b3591feca6b619939c2bb/bin/initdb, -A, trust, -U, postgres, -D, /tmp/epg3881361417977083194, -E, UTF-8] failed
#14 76.07       at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2218) ~[guava-23.0.jar:na]
#14 76.07       at com.google.common.cache.LocalCache.get(LocalCache.java:4147) ~[guava-23.0.jar:na]
#14 76.07       at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:4151) ~[guava-23.0.jar:na]
#14 76.07       at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:5140) ~[guava-23.0.jar:na]
#14 76.07       at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:5146) ~[guava-23.0.jar:na]
#14 76.07       at io.zonky.test.db.provider.impl.ZonkyPostgresDatabaseProvider.getDatabase(ZonkyPostgresDatabaseProvider.java:93) ~[embedded-database-spring-test-1.5.3.jar:na]
#14 76.07       at io.zonky.test.db.provider.impl.PrefetchingDatabaseProvider$PrefetchingTask.lambda$new$0(PrefetchingDatabaseProvider.java:252) ~[embedded-database-spring-test-1.5.3.jar:na]
#14 76.07       at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[na:na]
#14 76.07       at io.zonky.test.db.provider.impl.PrefetchingDatabaseProvider$PrefetchingTask.run(PrefetchingDatabaseProvider.java:259) ~[embedded-database-spring-test-1.5.3.jar:na]
#14 76.07       at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
#14 76.07       at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
#14 76.07       ... 1 common frames omitted
#14 76.07     Caused by: java.lang.IllegalStateException: Process [/tmp/embedded-pg/PG-a8263178df5b3591feca6b619939c2bb/bin/initdb, -A, trust, -U, postgres, -D, /tmp/epg3881361417977083194, -E, UTF-8] failed
#14 76.07       at io.zonky.test.db.postgres.embedded.EmbeddedPostgres.system(EmbeddedPostgres.java:631) ~[embedded-postgres-1.2.6.jar:na]
#14 76.07       at io.zonky.test.db.postgres.embedded.EmbeddedPostgres.initdb(EmbeddedPostgres.java:249) ~[embedded-postgres-1.2.6.jar:na]
#14 76.07       at io.zonky.test.db.postgres.embedded.EmbeddedPostgres.<init>(EmbeddedPostgres.java:156) ~[embedded-postgres-1.2.6.jar:na]
#14 76.07       at io.zonky.test.db.postgres.embedded.EmbeddedPostgres$Builder.start(EmbeddedPostgres.java:584) ~[embedded-postgres-1.2.6.jar:na]
#14 76.07       at io.zonky.test.db.provider.impl.ZonkyPostgresDatabaseProvider$DatabaseInstance.<init>(ZonkyPostgresDatabaseProvider.java:128) ~[embedded-database-spring-test-1.5.3.jar:na]
#14 76.07       at io.zonky.test.db.provider.impl.ZonkyPostgresDatabaseProvider$DatabaseInstance.<init>(ZonkyPostgresDatabaseProvider.java:112) ~[embedded-database-spring-test-1.5.3.jar:na]
#14 76.07       at io.zonky.test.db.provider.impl.ZonkyPostgresDatabaseProvider$1.load(ZonkyPostgresDatabaseProvider.java:59) ~[embedded-database-spring-test-1.5.3.jar:na]
#14 76.07       at io.zonky.test.db.provider.impl.ZonkyPostgresDatabaseProvider$1.load(ZonkyPostgresDatabaseProvider.java:57) ~[embedded-database-spring-test-1.5.3.jar:na]
#14 76.07       at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3708) ~[guava-23.0.jar:na]
#14 76.07       at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2416) ~[guava-23.0.jar:na]
#14 76.07       at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2299) ~[guava-23.0.jar:na]
#14 76.07       at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2212) ~[guava-23.0.jar:na]
#14 76.07       ... 11 common frames omitted
#14 76.07 
#14 76.07     2020-04-07 18:47:58.890  INFO 69 --- [initdb:pid(117)] i.z.t.d.p.embedded.EmbeddedPostgres      : initdb: cannot be run as root
#14 76.07     2020-04-07 18:47:58.908  INFO 69 --- [initdb:pid(117)] i.z.t.d.p.embedded.EmbeddedPostgres      : Please log in (using, e.g., "su") as the (unprivileged) user that will
#14 76.07     2020-04-07 18:47:58.908  INFO 69 --- [initdb:pid(117)] i.z.t.d.p.embedded.EmbeddedPostgres      : own the server process.
#14 76.07     2020-04-07 18:47:58.912  WARN 69 --- [    Test worker] s.c.a.AnnotationConfigApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayInitializer' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Unexpected error occurred while initializing the data source
#14 76.07     2020-04-07 18:47:58.918  INFO 69 --- [    Test worker] ConditionEvaluationReportLoggingListener : 
#14 76.07 
#14 76.07     Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
#14 76.16     2020-04-07 18:47:58.934 ERROR 69 --- [    Test worker] o.s.boot.SpringApplication               : Application run failed
#14 76.16 
#14 76.16     org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayInitializer' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Unexpected error occurred while initializing the data source
#14 76.16       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.16       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:595) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.16       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.16       at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.16       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.16       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.16       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.16       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:310) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.16       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.16       at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1108) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.16       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:868) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.16       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.16       at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) ~[spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
#14 76.16       at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) ~[spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
#14 76.16       at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) ~[spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
#14 76.16       at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:126) ~[spring-boot-test-2.2.6.RELEASE.jar:2.2.6.RELEASE]
#14 76.16       at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:99) ~[spring-test-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.16       at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:124) ~[spring-test-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.16       at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:123) ~[spring-test-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.16       at io.zonky.test.db.flyway.OptimizedFlywayTestExecutionListener.optimizedDbReset(OptimizedFlywayTestExecutionListener.java:139) ~[embedded-database-spring-test-1.5.3.jar:na]
#14 76.16       at io.zonky.test.db.flyway.OptimizedFlywayTestExecutionListener.beforeTestClass(OptimizedFlywayTestExecutionListener.java:101) ~[embedded-database-spring-test-1.5.3.jar:na]
#14 76.16       at org.springframework.test.context.TestContextManager.beforeTestClass(TestContextManager.java:213) ~[spring-test-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.16       at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:60) ~[spring-test-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.16       at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70) ~[spring-test-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.16       at org.junit.runners.ParentRunner.run(ParentRunner.java:363) ~[junit-4.12.jar:4.12]
#14 76.16       at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:190) ~[spring-test-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.16       at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.runTestClass(JUnitTestClassExecutor.java:110) ~[na:na]
#14 76.16       at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:58) ~[na:na]
#14 76.16       at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:38) ~[na:na]
#14 76.16       at org.gradle.api.internal.tasks.testing.junit.AbstractJUnitTestClassProcessor.processTestClass(AbstractJUnitTestClassProcessor.java:62) ~[na:na]
#14 76.16       at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:51) ~[na:na]
#14 76.16       at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
#14 76.16       at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
#14 76.16       at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
#14 76.16       at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
#14 76.16       at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36) ~[na:na]
#14 76.16       at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24) ~[na:na]
#14 76.16       at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33) ~[na:na]
#14 76.16       at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94) ~[na:na]
#14 76.16       at com.sun.proxy.$Proxy2.processTestClass(Unknown Source) ~[na:na]
#14 76.16       at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:118) ~[na:na]
#14 76.16       at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
#14 76.16       at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
#14 76.16       at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
#14 76.16       at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
#14 76.16       at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36) ~[na:na]
#14 76.16       at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24) ~[na:na]
#14 76.16       at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:182) ~[na:na]
#14 76.16       at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:164) ~[na:na]
#14 76.16       at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:412) ~[na:na]
#14 76.16       at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64) ~[na:na]
#14 76.16       at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48) ~[na:na]
#14 76.16       at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
#14 76.16       at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
#14 76.16       at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56) ~[na:na]
#14 76.16       at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]
#14 76.16     Caused by: java.lang.IllegalStateException: Unexpected error occurred while initializing the data source
#14 76.16       at com.google.common.base.Preconditions.checkState(Preconditions.java:459) ~[guava-23.0.jar:na]
#14 76.16       at io.zonky.test.db.flyway.DefaultFlywayDataSourceContext.getTarget(DefaultFlywayDataSourceContext.java:88) ~[embedded-database-spring-test-1.5.3.jar:na]
#14 76.16       at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:192) ~[spring-aop-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.16       at com.sun.proxy.$Proxy129.getConnection(Unknown Source) ~[na:na]
#14 76.16       at org.flywaydb.core.internal.jdbc.JdbcUtils.openConnection(JdbcUtils.java:56) ~[flyway-core-6.3.2.jar:na]
#14 76.16       at org.flywaydb.core.internal.jdbc.JdbcConnectionFactory.<init>(JdbcConnectionFactory.java:80) ~[flyway-core-6.3.2.jar:na]
#14 76.16       at org.flywaydb.core.Flyway.execute(Flyway.java:449) ~[flyway-core-6.3.2.jar:na]
#14 76.16       at org.flywaydb.core.Flyway.migrate(Flyway.java:153) ~[flyway-core-6.3.2.jar:na]
#14 76.16       at org.springframework.boot.autoconfigure.flyway.FlywayMigrationInitializer.afterPropertiesSet(FlywayMigrationInitializer.java:65) ~[spring-boot-autoconfigure-2.2.6.RELEASE.jar:2.2.6.RELEASE]
#14 76.16       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1855) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.16       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1792) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.16       ... 55 common frames omitted
#14 76.16 
#14 76.16     2020-04-07 18:47:58.986  WARN 69 --- [    Test worker] o.s.test.context.TestContextManager      : Caught exception while invoking 'beforeTestClass' callback on TestExecutionListener [io.zonky.test.db.flyway.OptimizedFlywayTestExecutionListener@a2accc7] for test class [class no.ruter.dpi.vvs.repository.JpaRepositoriesTest]
#14 76.16 
#14 76.16     java.lang.IllegalStateException: Failed to load ApplicationContext
#14 76.16       at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:132) ~[spring-test-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.16       at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:123) ~[spring-test-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.16       at io.zonky.test.db.flyway.OptimizedFlywayTestExecutionListener.optimizedDbReset(OptimizedFlywayTestExecutionListener.java:139) ~[embedded-database-spring-test-1.5.3.jar:na]
#14 76.16       at io.zonky.test.db.flyway.OptimizedFlywayTestExecutionListener.beforeTestClass(OptimizedFlywayTestExecutionListener.java:101) ~[embedded-database-spring-test-1.5.3.jar:na]
#14 76.16       at org.springframework.test.context.TestContextManager.beforeTestClass(TestContextManager.java:213) ~[spring-test-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.16       at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:60) ~[spring-test-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.16       at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70) ~[spring-test-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.16       at org.junit.runners.ParentRunner.run(ParentRunner.java:363) ~[junit-4.12.jar:4.12]
#14 76.16       at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:190) ~[spring-test-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.16       at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.runTestClass(JUnitTestClassExecutor.java:110) ~[na:na]
#14 76.16       at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:58) ~[na:na]
#14 76.16       at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:38) ~[na:na]
#14 76.16       at org.gradle.api.internal.tasks.testing.junit.AbstractJUnitTestClassProcessor.processTestClass(AbstractJUnitTestClassProcessor.java:62) ~[na:na]
#14 76.16       at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:51) ~[na:na]
#14 76.16       at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
#14 76.16       at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
#14 76.16       at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
#14 76.16       at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
#14 76.16       at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36) ~[na:na]
#14 76.16       at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24) ~[na:na]
#14 76.17       at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33) ~[na:na]
#14 76.17       at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94) ~[na:na]
#14 76.17       at com.sun.proxy.$Proxy2.processTestClass(Unknown Source) ~[na:na]
#14 76.17       at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:118) ~[na:na]
#14 76.17       at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
#14 76.17       at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
#14 76.17       at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
#14 76.17       at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
#14 76.17       at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36) ~[na:na]
#14 76.17       at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24) ~[na:na]
#14 76.17       at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:182) ~[na:na]
#14 76.17       at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:164) ~[na:na]
#14 76.17       at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:412) ~[na:na]
#14 76.17       at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64) ~[na:na]
#14 76.17       at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48) ~[na:na]
#14 76.17       at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
#14 76.17       at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
#14 76.17       at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56) ~[na:na]
#14 76.17       at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]
#14 76.17     Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayInitializer' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Unexpected error occurred while initializing the data source
#14 76.17       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.17       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:595) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.17       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.17       at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.17       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.17       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.17       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.17       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:310) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.17       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.17       at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1108) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.17       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:868) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.17       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.17       at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) ~[spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
#14 76.17       at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) ~[spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
#14 76.17       at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) ~[spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
#14 76.17       at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:126) ~[spring-boot-test-2.2.6.RELEASE.jar:2.2.6.RELEASE]
#14 76.17       at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:99) ~[spring-test-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.17       at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:124) ~[spring-test-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.17       ... 38 common frames omitted
#14 76.17     Caused by: java.lang.IllegalStateException: Unexpected error occurred while initializing the data source
#14 76.17       at com.google.common.base.Preconditions.checkState(Preconditions.java:459) ~[guava-23.0.jar:na]
#14 76.17       at io.zonky.test.db.flyway.DefaultFlywayDataSourceContext.getTarget(DefaultFlywayDataSourceContext.java:88) ~[embedded-database-spring-test-1.5.3.jar:na]
#14 76.17       at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:192) ~[spring-aop-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.17       at com.sun.proxy.$Proxy129.getConnection(Unknown Source) ~[na:na]
#14 76.17       at org.flywaydb.core.internal.jdbc.JdbcUtils.openConnection(JdbcUtils.java:56) ~[flyway-core-6.3.2.jar:na]
#14 76.17       at org.flywaydb.core.internal.jdbc.JdbcConnectionFactory.<init>(JdbcConnectionFactory.java:80) ~[flyway-core-6.3.2.jar:na]
#14 76.17       at org.flywaydb.core.Flyway.execute(Flyway.java:449) ~[flyway-core-6.3.2.jar:na]
#14 76.17       at org.flywaydb.core.Flyway.migrate(Flyway.java:153) ~[flyway-core-6.3.2.jar:na]
#14 76.17       at org.springframework.boot.autoconfigure.flyway.FlywayMigrationInitializer.afterPropertiesSet(FlywayMigrationInitializer.java:65) ~[spring-boot-autoconfigure-2.2.6.RELEASE.jar:2.2.6.RELEASE]
#14 76.17       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1855) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.17       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1792) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
#14 76.17       ... 55 common frames omitted
#14 76.17 
#14 76.26 
#14 76.26 no.ruter.dpi.vvs.repository.JpaRepositoriesTest > classMethod FAILED
#14 76.26     java.lang.IllegalStateException: Failed to load ApplicationContext
#14 76.26 
#14 76.26         Caused by:
#14 76.26         org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayInitializer' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Unexpected error occurred while initializing the data source
#14 76.26 
#14 76.26             Caused by:
#14 76.26             java.lang.IllegalStateException: Unexpected error occurred while initializing the data source
#14 76.26 
#14 76.26 Gradle Test Executor 1 finished executing tests.
#14 76.36 
#14 76.36 > Task :test FAILED
#14 76.36 
#14 76.36 2 tests completed, 2 failed
#14 76.36 Finished generating test XML results (0.038 secs) into: /build/test-results/test
#14 76.36 Generating HTML test report...
#14 76.36 Finished generating test html results (0.036 secs) into: /build/reports/tests/test
#14 76.36 :test (Thread[Execution worker for ':',5,main]) completed. Took 11.835 secs.
#14 76.36 FAILURE: Build failed with an exception.
#14 76.36 
#14 76.36 * What went wrong:
#14 76.36 Execution failed for task ':test'.
#14 76.36 > There were failing tests. See the report at: file:///build/reports/tests/test/index.html
#14 76.36 
#14 76.36 * Try:
#14 76.36 Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output. Run with --scan to get full insights.
#14 76.36 
#14 76.36 * Get more help at https://help.gradle.org
#14 76.36 
#14 76.36 
#14 76.36 Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
#14 76.36 Use '--warning-mode all' to show the individual deprecation warnings.
#14 76.36 See https://docs.gradle.org/6.0.1/userguide/command_line_interface.html#sec:command_line_warnings
#14 76.36 6 actionable tasks: 6 executed
#14 76.36 
#14 76.36 BUILD FAILED in 1m 15s
#14    completed: 2020-04-07 18:47:59.394717612 +0000 UTC
#14     duration: 1m16.534553969s
#14        error: "executor failed running [/bin/sh -c ./gradlew build --no-daemon -PmavenUser=\"$ORG_GRADLE_PROJECT_MAVEN_USER\" -PmavenPassword=\"$ORG_GRADLE_PROJECT_MAVEN_PASSWORD\" --info]: exit code: 1"

executor failed running [/bin/sh -c ./gradlew build --no-daemon -PmavenUser="$ORG_GRADLE_PROJECT_MAVEN_USER" -PmavenPassword="$ORG_GRADLE_PROJECT_MAVEN_PASSWORD" --info]: exit code: 1
[Pipeline] echo
Failed running command: export DOCKER_BUILDKIT=1 && docker build . --build-arg "ORG_GRADLE_PROJECT_MAVEN_USER=****" --build-arg "ORG_GRADLE_PROJECT_MAVEN_PASSWORD=****" --build-arg "BITBUCKET_USER_NAME=****" --build-arg "BITBUCKET_USER_PASSWORD=****"  -t 859184448936.dkr.ecr.eu-west-1.amazonaws.com/dpi/dpi-vvs-backend, error: hudson.AbortException: script returned exit code 1
[Pipeline] sh
+ sleep 8
[Pipeline] sh
+ exit 1
[Pipeline] }
[Pipeline] // withCredentials
[Pipeline] echo
Failed running command: docker_build, error: hudson.AbortException: script returned exit code 1
[Pipeline] sh
+ sleep 8
[Pipeline] sh
+ exit 1
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] }
[Pipeline] // node
[Pipeline] }
[Pipeline] // podTemplate
[Pipeline] End of Pipeline
[Bitbucket] Notifying commit build result
[Bitbucket] Build result notified
ERROR: script returned exit code 1
Finished: FAILURE
jevanio commented 4 years ago

As @Wobbley shows, I confirm the same log message. I assume that the solution should be create a user on docker but, as I undertand, Docker start always as root so it will be required to create/switch user prior to execute test, right?

Wobbley commented 4 years ago

@jevanio I got it to work by creating a seperate user, and giving him root-esque priviligies. We use the openjdk images, so it should work there. I tried tweaking a bitt priviligies and the likes until it worked, might be able to fine tune it, but not going to bother for now.

# The embedded-postgres we use for testing can not be run as root, so we have to create a seperate user to run gradle.
RUN useradd -ms /bin/bash nonrootuser &&\
    echo "nonrootuser ALL=(root) NOPASSWD:ALL" > /etc/sudoers
USER nonrootuser
WORKDIR /home/nonrootuser

<commands here gets run as nonrootuser>

If you need to run it as actual root again just do:

USER root
<more commands here run as root>

My final dockerfile looks like this:

FROM openjdk:11-jdk as build

# The embedded-postgres we use for testing can not be run as root, so we have to create a seperate user to run gradle.
RUN useradd -ms /bin/bash nonrootuser &&\
    echo "nonrootuser ALL=(root) NOPASSWD:ALL" > /etc/sudoers
USER nonrootuser
WORKDIR /home/nonrootuser

ARG ORG_GRADLE_PROJECT_MAVEN_USER
ARG ORG_GRADLE_PROJECT_MAVEN_PASSWORD

ADD gradle gradle
ADD gradlew .
ADD build.gradle .
ADD settings.gradle .
ADD src src
RUN ./gradlew build --no-daemon -PmavenUser="$ORG_GRADLE_PROJECT_MAVEN_USER" -PmavenPassword="$ORG_GRADLE_PROJECT_MAVEN_PASSWORD"

FROM openjdk:11
COPY --from=build /home/nonrootuser/build/libs/*.jar app.jar
ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar","/app.jar"]
tomix26 commented 4 years ago

@Wobbley Thank you very much for your comprehensive investigation. Your results are correct, embedded-postgres cannot run as root user. It is a restriction of PostgreSQL database and it is described at https://github.com/zonkyio/embedded-database-spring-test#running-tests-inside-docker-does-not-work.

So there are two possible solutions. Either you can use the default provider and have to ensure that the process runs under a non-root user. Or, you can use the docker provider that runs the database in a docker container. The container is isolated from the system running on Jenkins slaves, so it solves all issues with the users.

However, it should be noted that in your case, you would then run a docker container in another docker container. Which is possible, but it is an extra complication. It is described here: https://github.com/zonkyio/embedded-database-spring-test#using-docker-provider-inside-a-docker-container

Kalffman commented 4 years ago

So there are two possible solutions. Either you can use the default provider and have to ensure that the process runs under a non-root user. Or, you can use the docker provider that runs the database in a docker container. The container is isolated from the system running on Jenkins slaves, so it solves all issues with the users.

Excelent @tomix26 👍