You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JUnit extensions are now fully thread safe through the use of `ExtensionContext.Store`. `SingleInstancePostgresExtension` has had its functionality extended to be able to run for the entire class instead of just per method.
Copy file name to clipboardExpand all lines: README.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ dependencies {
34
34
And the following to your `gradle.properties`:
35
35
```properties
36
36
# Check this on https://central.sonatype.com/artifact/com.smushytaco/embedded-postgres/
37
-
embedded_postgres_version = 3.0.1
37
+
embedded_postgres_version = 3.0.2
38
38
```
39
39
40
40
The default version of the embedded postgres is `PostgreSQL 18.0.0`, but you can change it by following the instructions described in [Postgres version](#postgres-version).
This simply has JUnit manage an instance of EmbeddedPostgres (start, stop). You can then use this to get a DataSource with: `pg.getEmbeddedPostgres().getPostgresDatabase();`
@@ -60,13 +60,13 @@ You can easily integrate Flyway or Liquibase database schema migration:
60
60
##### Flyway
61
61
```java
62
62
@RegisterExtension
63
-
PreparedDbExtension db =EmbeddedPostgresExtension.preparedDatabase(FlywayPreparer.forClasspathLocation("db/my-db-schema"));
63
+
finalPreparedDbExtension db =EmbeddedPostgresExtension.preparedDatabase(FlywayPreparer.forClasspathLocation("db/my-db-schema"));
64
64
```
65
65
66
66
##### Liquibase
67
67
```java
68
68
@RegisterExtension
69
-
PreparedDbExtension db =EmbeddedPostgresExtension.preparedDatabase(LiquibasePreparer.forClasspathLocation("liqui/master.xml"));
69
+
finalPreparedDbExtension db =EmbeddedPostgresExtension.preparedDatabase(LiquibasePreparer.forClasspathLocation("liqui/master.xml"));
70
70
```
71
71
72
72
This will create an independent database for every test with the given schema loaded from the classpath.
0 commit comments