Skip to content
Permalink
Browse files

Add support for version 11 and version 12 (#1332)

* Add support for version 11 and version 12

* add tests for ServerVersion

* remove core.ServerVersionTest, move tests into util.ServerVersionTest
  • Loading branch information...
davecramer committed Nov 22, 2018
1 parent 2ad1ac3 commit 7f0e200affbf4b6504bfafccaf6cfcdbe3b0219e
@@ -24,7 +24,9 @@
v9_4("9.4.0"),
v9_5("9.5.0"),
v9_6("9.6.0"),
v10("10")
v10("10"),
v11("11"),
v12("12")
;

private final int version;
@@ -47,6 +47,7 @@ public ServerVersionParseTest(String versionString, int versionNum, String rejec
{"9.6", 90600, null},
{"10", 100000, null},
{"11", 110000, null},
{"12", 120000, null},
/* Multidigit */
{"9.4.10", 90410, null},
{"9.20.10", 92010, null},
@@ -22,4 +22,14 @@ public void versionIncreases() {
prev = serverVersion;
}
}

@Test
public void testVersions() {
Assert.assertEquals(ServerVersion.v12.getVersionNum(), ServerVersion.from("12.0").getVersionNum());
Assert.assertEquals(120004, ServerVersion.from("12.4").getVersionNum());
Assert.assertEquals(ServerVersion.v11.getVersionNum(), ServerVersion.from("11.0").getVersionNum());
Assert.assertEquals(110006, ServerVersion.from("11.6").getVersionNum());
Assert.assertEquals(ServerVersion.v10.getVersionNum(), ServerVersion.from("10.0").getVersionNum());
Assert.assertTrue(ServerVersion.v9_6.getVersionNum() < ServerVersion.from("9.6.4").getVersionNum());
}
}

0 comments on commit 7f0e200

Please sign in to comment.
You can’t perform that action at this time.