TransactionPropagationTest

19

tests

0

failures

0

ignored

0.513s

duration

100%

successful

Tests

Test Duration Result
PROPAGATION_MANDATORY_should_throw_an_exception_if_no_transaction_exists() 0.006s passed
PROPAGATION_NESTED_should_behave_like_PROPAGATION_REQUIRED_if_no_transaction_exists() 0.007s passed
PROPAGATION_NESTED_should_commit_only_if_outer_transaction_is_committed() 0.014s passed
PROPAGATION_NESTED_should_create_a_savepoint_if_one_transaction_exists() 0.026s passed
PROPAGATION_NESTED_should_rollback_if_outer_transaction_rolled_back() 0.025s passed
PROPAGATION_NEVER_should_execute_non_transactionally_if_no_transaction_exists() 0.017s passed
PROPAGATION_NEVER_should_throw_an_exception_if_one_transaction_exists() 0.006s passed
PROPAGATION_NOT_SUPPORTED_should_execute_non_transactionally_if_no_transaction_exists() 0.004s passed
PROPAGATION_NOT_SUPPORTED_should_execute_non_transactionally_if_one_transaction_exists() 0.277s passed
PROPAGATION_REQUIRED_should_create_a_new_transaction_if_none_exists() 0.008s passed
PROPAGATION_REQUIRED_should_not_create_a_new_transaction_if_one_exists() 0.009s passed
PROPAGATION_REQUIRES_NEW_should_create_a_new_transaction_even_if_one_exists() 0.006s passed
PROPAGATION_SUPPORTS_should_execute_non_transactionally_if_no_transaction_exists() 0.019s passed
PROPAGATION_SUPPORTS_should_execute_transactionally_if_one_transaction_exists() 0.009s passed
PROPAGATION_SUPPORTS_should_not_rollback_if_no_transaction_exists() 0.009s passed
outer_transaction_could_not_commit_if_inner_PROPAGATION_MANDATORY_transaction_throws_an_exception() 0.019s passed
outer_transaction_could_not_commit_if_inner_PROPAGATION_REQUIRED_transaction_throws_an_exception() 0.010s passed
outer_transaction_should_not_rollback_if_inner_PROPAGATION_REQUIRES_NEW_transaction_throws_an_exception() 0.010s passed
outer_transaction_should_not_rollback_if_internal_nested_transaction_rolled_back() 0.032s passed

Standard output

2021-06-10 19:28:06.836  INFO 13839 --- [    Test worker] .b.t.c.SpringBootTestContextBootstrapper : Neither @ContextConfiguration nor @ContextHierarchy found for test class [playground.spring.jpa.TransactionPropagationTest], using SpringBootContextLoader
2021-06-10 19:28:06.837  INFO 13839 --- [    Test worker] o.s.t.c.support.AbstractContextLoader    : Could not detect default resource locations for test class [playground.spring.jpa.TransactionPropagationTest]: no resource found for suffixes {-context.xml, Context.groovy}.
2021-06-10 19:28:06.837  INFO 13839 --- [    Test worker] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [playground.spring.jpa.TransactionPropagationTest]: TransactionPropagationTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration.
2021-06-10 19:28:06.844  INFO 13839 --- [    Test worker] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration playground.spring.Application for test class playground.spring.jpa.TransactionPropagationTest
2021-06-10 19:28:06.845  INFO 13839 --- [    Test worker] .b.t.c.SpringBootTestContextBootstrapper : Loaded default TestExecutionListener class names from location [META-INF/spring.factories]: [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.autoconfigure.webservices.client.MockWebServiceServerTestExecutionListener, 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.event.ApplicationEventsTestExecutionListener, 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]
2021-06-10 19:28:06.846  INFO 13839 --- [    Test worker] .b.t.c.SpringBootTestContextBootstrapper : Using TestExecutionListeners: [org.springframework.test.context.web.ServletTestExecutionListener@7a0e27dd, org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener@68cd93a1, org.springframework.test.context.event.ApplicationEventsTestExecutionListener@42f7e142, org.springframework.boot.test.mock.mockito.MockitoTestExecutionListener@6c1846ee, org.springframework.boot.test.autoconfigure.SpringBootDependencyInjectionTestExecutionListener@67a3b47f, org.springframework.test.context.support.DirtiesContextTestExecutionListener@637763b1, org.springframework.test.context.transaction.TransactionalTestExecutionListener@1ef7636c, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener@3076796a, org.springframework.test.context.event.EventPublishingTestExecutionListener@4a8c2357, org.springframework.boot.test.autoconfigure.restdocs.RestDocsTestExecutionListener@123eab5c, org.springframework.boot.test.autoconfigure.web.client.MockRestServiceServerResetTestExecutionListener@37775674, org.springframework.boot.test.autoconfigure.web.servlet.MockMvcPrintOnlyOnFailureTestExecutionListener@34c9c4d9, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverTestExecutionListener@1f74cf8c, org.springframework.boot.test.autoconfigure.webservices.client.MockWebServiceServerTestExecutionListener@7877e375, org.springframework.boot.test.mock.mockito.ResetMocksTestExecutionListener@753edef9]

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::                (v2.5.0)

2021-06-10 19:28:06.876  INFO 13839 --- [    Test worker] p.spring.jpa.TransactionPropagationTest  : Starting TransactionPropagationTest using Java 11.0.2 on travis-job-c3916ad0-4bcb-4d46-9b22-3ba711191077 with PID 13839 (started by travis in /home/travis/build/pojozhang/playground/solutions/java)
2021-06-10 19:28:06.878  INFO 13839 --- [    Test worker] p.spring.jpa.TransactionPropagationTest  : No active profile set, falling back to default profiles: default
2021-06-10 19:28:07.008  INFO 13839 --- [    Test worker] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2021-06-10 19:28:07.015  INFO 13839 --- [    Test worker] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 7 ms. Found 1 JPA repository interfaces.
2021-06-10 19:28:07.202  INFO 13839 --- [    Test worker] o.hibernate.jpa.internal.util.LogHelper  : HHH000204: Processing PersistenceUnitInfo [name: default]
2021-06-10 19:28:07.212  INFO 13839 --- [    Test worker] com.zaxxer.hikari.HikariDataSource       : HikariPool-3 - Starting...
2021-06-10 19:28:07.213  INFO 13839 --- [    Test worker] com.zaxxer.hikari.HikariDataSource       : HikariPool-3 - Start completed.
2021-06-10 19:28:07.214  INFO 13839 --- [    Test worker] org.hibernate.dialect.Dialect            : HHH000400: Using dialect: org.hibernate.dialect.H2Dialect
Hibernate: drop table if exists film CASCADE 
Hibernate: create table film (id bigint generated by default as identity, name varchar(255), primary key (id))
2021-06-10 19:28:07.263  INFO 13839 --- [    Test worker] o.h.e.t.j.p.i.JtaPlatformInitiator       : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
2021-06-10 19:28:07.264  INFO 13839 --- [    Test worker] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2021-06-10 19:28:07.676  INFO 13839 --- [    Test worker] p.spring.jpa.TransactionPropagationTest  : Started TransactionPropagationTest in 0.827 seconds (JVM running for 82.329)
2021-06-10 19:28:07.678  INFO 13839 --- [    Test worker] o.s.b.a.ApplicationAvailabilityBean      : Application availability state LivenessState changed to CORRECT
2021-06-10 19:28:07.679  INFO 13839 --- [    Test worker] o.s.b.a.ApplicationAvailabilityBean      : Application availability state ReadinessState changed to ACCEPTING_TRAFFIC
Hibernate: select filmentity0_.id as id1_0_, filmentity0_.name as name2_0_ from film filmentity0_
Hibernate: select filmentity0_.id as id1_0_, filmentity0_.name as name2_0_ from film filmentity0_
Hibernate: select count(*) as col_0_0_ from film filmentity0_
Hibernate: select filmentity0_.id as id1_0_, filmentity0_.name as name2_0_ from film filmentity0_
Hibernate: select count(*) as col_0_0_ from film filmentity0_
Hibernate: select count(*) as col_0_0_ from film filmentity0_
Hibernate: select filmentity0_.id as id1_0_, filmentity0_.name as name2_0_ from film filmentity0_
Hibernate: select filmentity0_.id as id1_0_, filmentity0_.name as name2_0_ from film filmentity0_
Hibernate: select filmentity0_.id as id1_0_, filmentity0_.name as name2_0_ from film filmentity0_
Hibernate: select count(*) as col_0_0_ from film filmentity0_
Hibernate: select count(*) as col_0_0_ from film filmentity0_
Hibernate: select filmentity0_.id as id1_0_, filmentity0_.name as name2_0_ from film filmentity0_
Hibernate: select filmentity0_.id as id1_0_, filmentity0_.name as name2_0_ from film filmentity0_
Hibernate: select filmentity0_.id as id1_0_, filmentity0_.name as name2_0_ from film filmentity0_
Hibernate: select filmentity0_.id as id1_0_, filmentity0_.name as name2_0_ from film filmentity0_
Hibernate: select filmentity0_.id as id1_0_, filmentity0_.name as name2_0_ from film filmentity0_
Hibernate: select filmentity0_.id as id1_0_, filmentity0_.name as name2_0_ from film filmentity0_
Hibernate: select filmentity0_.id as id1_0_, filmentity0_.name as name2_0_ from film filmentity0_
Hibernate: select filmentity0_.id as id1_0_, filmentity0_.name as name2_0_ from film filmentity0_
Hibernate: select filmentity0_.id as id1_0_, filmentity0_.name as name2_0_ from film filmentity0_
Hibernate: select count(*) as col_0_0_ from film filmentity0_
Hibernate: select filmentity0_.id as id1_0_, filmentity0_.name as name2_0_ from film filmentity0_