Skip to content

Commit 3ecfa66

Browse files
committed
DATAJDBC-576 - Polishing.
Consistent spelling of license. Tweak exception propagation. Consistently use asciidoc syntax for code blocks. Original pull request: #239.
1 parent a0b5dda commit 3ecfa66

File tree

3 files changed

+19
-18
lines changed

3 files changed

+19
-18
lines changed

README.adoc

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -159,19 +159,20 @@ Runs integration test against a single in memory database.
159159

160160
To run integration tests against all supported databases specify the Maven Profile `all-dbs`.
161161

162-
```
162+
[source,bash]
163+
----
163164
./mvnw clean install -Pall-dbs
164-
```
165+
----
165166

166-
This requires an appropriate `container-license-acceptance.txt` to be on the classpath, signaling that you accept the licence of the databases used.
167+
This requires an appropriate `container-license-acceptance.txt` to be on the classpath, signaling that you accept the license of the databases used.
167168

168-
If you don't want to accept these licences you may add the Maven Profile `ignore-missing-licence`.
169+
If you don't want to accept these licences you may add the Maven Profile `ignore-missing-license`.
169170
This will ignore the tests that require an explicit license acceptance.
170171

171-
```
172-
./mvnw clean install -Pall-dbs,ignore-missing-licence
173-
```
174-
172+
[source,bash]
173+
----
174+
./mvnw clean install -Pall-dbs,ignore-missing-license
175+
----
175176

176177
If you want to run an integration tests against a different database you can do so by activating an apropriate Spring Profile.
177178
Available are the following Spring Profiles:

pom.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@
128128
<includes>
129129
<include>**/*IntegrationTests.java</include>
130130
</includes>
131+
<excludes>
131132
<exclude>**/*HsqlIntegrationTests.java</exclude>
132133
</excludes>
133134
<systemPropertyVariables>
@@ -231,15 +232,15 @@
231232
</build>
232233
</profile>
233234
<profile>
234-
<id>ignore-missing-licence</id>
235+
<id>ignore-missing-license</id>
235236
<build>
236237
<plugins>
237238
<plugin>
238239
<groupId>org.apache.maven.plugins</groupId>
239240
<artifactId>maven-surefire-plugin</artifactId>
240241
<configuration>
241242
<systemPropertyVariables>
242-
<on-missing-licence>ignore-test</on-missing-licence>
243+
<on-missing-license>ignore-test</on-missing-license>
243244
</systemPropertyVariables>
244245
</configuration>
245246
</plugin>

spring-data-jdbc/src/test/java/org/springframework/data/jdbc/testing/LicenseListener.java

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
/**
2929
* {@link TestExecutionListener} to selectively skip tests if the license for a particular database container was not
3030
* accepted.
31-
*
31+
*
3232
* @author Mark Paluch
3333
* @author Jens Schauder
3434
*/
@@ -57,14 +57,13 @@ private void assumeLicenseAccepted(String imageName) {
5757
LicenseAcceptance.assertLicenseAccepted(imageName);
5858
} catch (IllegalStateException e) {
5959

60-
if (environment.getProperty("on-missing-licence", "fail").equals("ignore-test")) {
61-
throw new AssumptionViolatedException(e.getMessage());
62-
} else {
63-
64-
throw new IllegalStateException(
65-
"You need to accept the licence for the database with which you are testing or set \"ignore-missing-licence\" as active profile in order to skip tests for which a licence is missing.",
66-
e);
60+
if (environment.getProperty("on-missing-license", "fail").equals("ignore-test")) {
61+
throw new AssumptionViolatedException(e.getMessage(), e);
6762
}
63+
64+
throw new IllegalStateException(
65+
"You need to accept the license for the database with which you are testing or set \"ignore-missing-license\" as active profile in order to skip tests for which a license is missing.",
66+
e);
6867
}
6968
}
7069

0 commit comments

Comments
 (0)