Skip to content

Commit 199ad1c

Browse files
committed
Change cached directory for postgresql-embedded
(Workaround for yandex-qatools/postgresql-embedded#110) See gh-1133
1 parent 2d62dc1 commit 199ad1c

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/test/java/org/apache/ibatis/submitted/usesjava8/keycolumn/InsertTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public class InsertTest {
5757
@BeforeClass
5858
public static void setUp() throws Exception {
5959
// Launch PostgreSQL server. Download / unarchive if necessary.
60-
String url = postgres.start(EmbeddedPostgres.cachedRuntimeConfig(Paths.get("target/postgres")), "localhost", SocketUtil.findFreePort(), "keycolumn", "postgres", "root", Collections.emptyList());
60+
String url = postgres.start(EmbeddedPostgres.cachedRuntimeConfig(Paths.get(System.getProperty("java.io.tmpdir"), "pgembed")), "localhost", SocketUtil.findFreePort(), "keycolumn", "postgres", "root", Collections.emptyList());
6161

6262
Configuration configuration = new Configuration();
6363
Environment environment = new Environment("development", new JdbcTransactionFactory(), new UnpooledDataSource(

src/test/java/org/apache/ibatis/submitted/usesjava8/multiple_resultsets/MultipleResultTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public class MultipleResultTest {
5555
@BeforeClass
5656
public static void setUp() throws Exception {
5757
// Launch PostgreSQL server. Download / unarchive if necessary.
58-
String url = postgres.start(EmbeddedPostgres.cachedRuntimeConfig(Paths.get("target/postgres")), "localhost", SocketUtil.findFreePort(), "multiple_resultsets", "postgres", "root", Collections.emptyList());
58+
String url = postgres.start(EmbeddedPostgres.cachedRuntimeConfig(Paths.get(System.getProperty("java.io.tmpdir"), "pgembed")), "localhost", SocketUtil.findFreePort(), "multiple_resultsets", "postgres", "root", Collections.emptyList());
5959

6060
Configuration configuration = new Configuration();
6161
Environment environment = new Environment("development", new JdbcTransactionFactory(), new UnpooledDataSource(

src/test/java/org/apache/ibatis/submitted/usesjava8/postgres_genkeys/PostgresGeneratedKeysTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public class PostgresGeneratedKeysTest {
4848
@BeforeClass
4949
public static void setUp() throws Exception {
5050
// Launch PostgreSQL server. Download / unarchive if necessary.
51-
String url = postgres.start(EmbeddedPostgres.cachedRuntimeConfig(Paths.get("target/postgres")), "localhost", SocketUtil.findFreePort(), "postgres_genkeys", "postgres", "root", Collections.emptyList());
51+
String url = postgres.start(EmbeddedPostgres.cachedRuntimeConfig(Paths.get(System.getProperty("java.io.tmpdir"), "pgembed")), "localhost", SocketUtil.findFreePort(), "postgres_genkeys", "postgres", "root", Collections.emptyList());
5252

5353
Configuration configuration = new Configuration();
5454
Environment environment = new Environment("development", new JdbcTransactionFactory(), new UnpooledDataSource(

src/test/java/org/apache/ibatis/submitted/usesjava8/refcursor/RefCursorTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public class RefCursorTest {
6060
@BeforeClass
6161
public static void setUp() throws Exception {
6262
// Launch PostgreSQL server. Download / unarchive if necessary.
63-
String url = postgres.start(EmbeddedPostgres.cachedRuntimeConfig(Paths.get("target/postgres")), "localhost", SocketUtil.findFreePort(), "refcursor", "postgres", "root", Collections.emptyList());
63+
String url = postgres.start(EmbeddedPostgres.cachedRuntimeConfig(Paths.get(System.getProperty("java.io.tmpdir"), "pgembed")), "localhost", SocketUtil.findFreePort(), "refcursor", "postgres", "root", Collections.emptyList());
6464

6565
Configuration configuration = new Configuration();
6666
Environment environment = new Environment("development", new JdbcTransactionFactory(), new UnpooledDataSource(

0 commit comments

Comments
 (0)