Skip to content

Commit

Permalink
Polish
Browse files Browse the repository at this point in the history
  • Loading branch information
izeye authored and jonatan-ivanov committed Jun 16, 2023
1 parent ca0e894 commit 0615783
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -649,12 +649,12 @@ public static class Admin {
private final Map<String, String> properties = new HashMap<>();

/**
* The close timeout.
* Close timeout.
*/
private Duration closeTimeout;

/**
* The operation timeout.
* Operation timeout.
*/
private Duration operationTimeout;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
*
* @author Phillip Webb
*/
public class SessionAutoConfigurationEarlyInitializationIntegrationTests {
class SessionAutoConfigurationEarlyInitializationIntegrationTests {

@Test
void configurationIsFrozenWhenSessionRepositoryAccessed() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,10 @@ Open your favorite text editor and add the following:
plugins {
id 'java'
id 'org.springframework.boot' version '{spring-boot-version}'
id 'io.spring.dependency-management' version '1.1.0'
}
apply plugin: 'io.spring.dependency-management'

This comment was marked as outdated.

Copy link
@ciscoo

ciscoo Jun 16, 2023

This should be reverted IMO, plugins DSL is preferred from my understanding.

#34048

This comment was marked as resolved.

Copy link
@ciscoo

ciscoo Jun 16, 2023

Disregard, missed the conversation in the PR.

group = 'com.example'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '17'
Expand Down Expand Up @@ -247,7 +248,7 @@ If you run `gradle dependencies` again, you see that there are now a number of a
[[getting-started.first-application.code]]
=== Writing the Code
To finish our application, we need to create a single Java file.
By default, Maven and Gradle compiles sources from `src/main/java`, so you need to create that directory structure and then add a file named `src/main/java/MyApplication.java` to contain the following code:
By default, Maven and Gradle compile sources from `src/main/java`, so you need to create that directory structure and then add a file named `src/main/java/MyApplication.java` to contain the following code:

include::code:MyApplication[]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ For JWT configuration, a JWK Set URI or OIDC Issuer URI needs to be specified, a
NOTE: If the authorization server does not support a JWK Set URI, you can configure the resource server with the Public Key used for verifying the signature of the JWT.
This can be done using the configprop:spring.security.oauth2.resourceserver.jwt.public-key-location[] property, where the value needs to point to a file containing the public key in the PEM-encoded x509 format.

The configprop:spring.security.oauth2.resourceserver.jwt.audiences[] property can be used to specifify the expected values of the aud claim in JWTs.
The configprop:spring.security.oauth2.resourceserver.jwt.audiences[] property can be used to specify the expected values of the aud claim in JWTs.
For example, to require JWTs to contain an aud claim with the value `my-audience`:

[source,yaml,indent=0,subs="verbatim",configprops,configblocks]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

/**
* {@link BeanFactoryPostProcessor} to prevent {@link AutoCloseable} destruction calls so
* that {@link TestcontainersLifecycleBeanFactoryPostProcessor} can be smarter about which
* that {@link TestcontainersLifecycleBeanPostProcessor} can be smarter about which
* containers to close.
*
* @author Phillip Webb
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class TestcontainersLifecycleBeanPostProcessor implements DestructionAwareBeanPo

private static final Log logger = LogFactory.getLog(TestcontainersLifecycleBeanPostProcessor.class);

private ConfigurableListableBeanFactory beanFactory;
private final ConfigurableListableBeanFactory beanFactory;

private volatile boolean containersInitialized = false;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
import static org.mockito.Mockito.times;

/**
* Tests for {@link TestcontainersLifecycleApplicationContextInitializer} and
* {@link TestcontainersLifecycleBeanPostProcessor} and
* Tests for {@link TestcontainersLifecycleApplicationContextInitializer},
* {@link TestcontainersLifecycleBeanPostProcessor}, and
* {@link TestcontainersLifecycleBeanFactoryPostProcessor}.
*
* @author Stephane Nicoll
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@
import static org.assertj.core.api.Assertions.assertThat;

/**
* Integration tests for {@link TestcontainersLifecycleApplicationContextInitializer} to
* ensure create and destroy events happen in the correct order.
* Integration tests for {@link TestcontainersLifecycleBeanPostProcessor} to ensure create
* and destroy events happen in the correct order.
*
* @author Phillip Webb
*/
@ExtendWith(AssertingSpringExtension.class)
@ContextConfiguration(classes = { TestConfig.class, ContainerConfig.class })
@DirtiesContext
@DisabledIfDockerUnavailable
public class TestcontainersLifecycleOrderIntegrationTests {
class TestcontainersLifecycleOrderIntegrationTests {

static List<String> events = Collections.synchronizedList(new ArrayList<>());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ void equalsAndHashCode() {
ServiceConnectionContextCustomizer n3 = new ServiceConnectionContextCustomizer(
List.of(new ContainerConnectionSource<>("test", this.origin, PostgreSQLContainer.class, "namex",
annotation1, () -> container1)));
assertThat(n1.hashCode()).isEqualTo(n2.hashCode());
assertThat(n1.hashCode()).isEqualTo(n2.hashCode()).isNotEqualTo(n3.hashCode());
assertThat(n1).isEqualTo(n2).isNotEqualTo(n3);
// Connection Details Types
ServiceConnectionContextCustomizer t1 = new ServiceConnectionContextCustomizer(
Expand All @@ -122,7 +122,7 @@ void equalsAndHashCode() {
ServiceConnectionContextCustomizer t3 = new ServiceConnectionContextCustomizer(
List.of(new ContainerConnectionSource<>("test", this.origin, PostgreSQLContainer.class, "name",
annotation3, () -> container1)));
assertThat(t1.hashCode()).isEqualTo(t2.hashCode());
assertThat(t1.hashCode()).isEqualTo(t2.hashCode()).isNotEqualTo(t3.hashCode());
assertThat(t1).isEqualTo(t2).isNotEqualTo(t3);
// Container
ServiceConnectionContextCustomizer c1 = new ServiceConnectionContextCustomizer(
Expand All @@ -134,7 +134,7 @@ void equalsAndHashCode() {
ServiceConnectionContextCustomizer c3 = new ServiceConnectionContextCustomizer(
List.of(new ContainerConnectionSource<>("test", this.origin, PostgreSQLContainer.class, "name",
annotation1, () -> container2)));
assertThat(c1.hashCode()).isEqualTo(c2.hashCode());
assertThat(c1.hashCode()).isEqualTo(c2.hashCode()).isNotEqualTo(c3.hashCode());
assertThat(c1).isEqualTo(c2).isNotEqualTo(c3);
}

Expand Down

0 comments on commit 0615783

Please sign in to comment.