Skip to content
This repository was archived by the owner on May 12, 2020. It is now read-only.

Commit 0ab8b68

Browse files
t9tsmecsia
authored andcommitted
Add support for Postgresql 10.0 and 9.6.5 (#102)
* Update 9.6 version to 9.6.5 * Add support for Postgresql 10.0
1 parent b8cde79 commit 0ab8b68

File tree

3 files changed

+16
-14
lines changed

3 files changed

+16
-14
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ postgres.start(cachedRuntimeConfig("C:\\Users\\vasya\\pgembedded-installation"))
115115

116116
### Supported Versions
117117

118-
Versions: 9.6.2, 9.5.5, 9.4.10, any custom
118+
Versions: 10.0, 9.6.5, 9.5.7, any custom
119119

120120
Platforms: Linux, Windows and MacOSX supported
121121

src/main/java/ru/yandex/qatools/embed/postgresql/distribution/Version.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
* PostgreSQL Version enum
77
*/
88
public enum Version implements IVersion {
9-
V9_6_3("9.6.3-1"),
9+
V10_0("10.0-1"),
10+
V9_6_5("9.6.5-1"),
1011
@Deprecated V9_5_7("9.5.7-1"),;
1112

1213
private final String specificVersion;
@@ -27,8 +28,9 @@ public String toString() {
2728

2829
public enum Main implements IVersion {
2930
V9_5(V9_5_7),
30-
V9_6(V9_6_3),
31-
PRODUCTION(V9_6);
31+
V9_6(V9_6_5),
32+
V10(V10_0),
33+
PRODUCTION(V10_0);
3234

3335
private final IVersion _latest;
3436

@@ -41,4 +43,4 @@ public String asInDownloadPath() {
4143
return _latest.asInDownloadPath();
4244
}
4345
}
44-
}
46+
}

src/test/java/ru/yandex/qatools/embed/postgresql/TestMultipleInstance.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ public void itShouldAllowToRunTwoInstancesWithDifferentVersions() throws Excepti
1717
final EmbeddedPostgres postgres0 = new EmbeddedPostgres();
1818
postgres0.start();
1919
assertThat(postgres0.getConnectionUrl().isPresent(), is(true));
20-
checkVersion(postgres0.getConnectionUrl().get(), "PostgreSQL 9.6");
20+
checkVersion(postgres0.getConnectionUrl().get(), "PostgreSQL 10.0");
2121
postgres0.stop();
2222

23-
final EmbeddedPostgres postgres1 = new EmbeddedPostgres(Version.Main.V9_5);
23+
final EmbeddedPostgres postgres1 = new EmbeddedPostgres(Version.Main.V9_6);
2424
postgres1.start();
2525
assertThat(postgres1.getConnectionUrl().isPresent(), is(true));
26-
checkVersion(postgres1.getConnectionUrl().get(), "PostgreSQL 9.5");
26+
checkVersion(postgres1.getConnectionUrl().get(), "PostgreSQL 9.6");
2727
postgres1.stop();
2828
}
2929

@@ -37,25 +37,25 @@ public void itShouldAllowToRunTwoInstancesAtSameTime() throws Exception {
3737
postgres1.start();
3838
assertThat(postgres1.getConnectionUrl().isPresent(), is(true));
3939

40-
checkVersion(postgres0.getConnectionUrl().get(), "PostgreSQL 9.6");
41-
checkVersion(postgres1.getConnectionUrl().get(), "PostgreSQL 9.6");
40+
checkVersion(postgres0.getConnectionUrl().get(), "PostgreSQL 10.0");
41+
checkVersion(postgres1.getConnectionUrl().get(), "PostgreSQL 10.0");
4242

4343
postgres0.stop();
4444
postgres1.stop();
4545
}
4646

4747
@Test
4848
public void itShouldAllowToRunTwoInstancesAtSameTimeAndWithDifferentVersions() throws Exception {
49-
final EmbeddedPostgres postgres0 = new EmbeddedPostgres(Version.Main.V9_5);
49+
final EmbeddedPostgres postgres0 = new EmbeddedPostgres(Version.Main.V9_6);
5050
postgres0.start();
5151
assertThat(postgres0.getConnectionUrl().isPresent(), is(true));
5252

53-
final EmbeddedPostgres postgres1 = new EmbeddedPostgres(Version.Main.V9_6);
53+
final EmbeddedPostgres postgres1 = new EmbeddedPostgres(Version.Main.V10);
5454
postgres1.start();
5555
assertThat(postgres1.getConnectionUrl().isPresent(), is(true));
5656

57-
checkVersion(postgres0.getConnectionUrl().get(), "PostgreSQL 9.5");
58-
checkVersion(postgres1.getConnectionUrl().get(), "PostgreSQL 9.6");
57+
checkVersion(postgres0.getConnectionUrl().get(), "PostgreSQL 9.6");
58+
checkVersion(postgres1.getConnectionUrl().get(), "PostgreSQL 10.0");
5959

6060
postgres0.stop();
6161
postgres1.stop();

0 commit comments

Comments
 (0)