Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gateway-ha/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.4.192</version>
<version>2.4.240</version>
<scope>test</scope>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ CREATE TABLE IF NOT EXISTS resource_groups_global_properties (

CREATE TABLE IF NOT EXISTS exact_match_source_selectors (
resource_group_id VARCHAR(256) NOT NULL,
update_time DATETIME NOT NULL,
update_time TIMESTAMP NOT NULL,

-- Selector fields which must exactly match a query
source VARCHAR(512) NOT NULL,
Expand All @@ -75,4 +75,4 @@ CREATE TABLE IF NOT EXISTS exact_match_source_selectors (

PRIMARY KEY (environment, source, query_type),
UNIQUE (source, environment, query_type, resource_group_id)
);
);
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public static void prepareMockBackend(

public static void seedRequiredData(String h2DbFilePath)
{
String jdbcUrl = "jdbc:h2:" + h2DbFilePath;
String jdbcUrl = "jdbc:h2:" + h2DbFilePath + ";NON_KEYWORDS=NAME,VALUE";
Jdbi jdbi = Jdbi.create(jdbcUrl, "sa", "sa");
try (Handle handle = jdbi.open()) {
handle.createUpdate(HaGatewayTestUtils.getResourceFileContent("gateway-ha-persistence-mysql.sql"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public static DataStoreConfiguration dataStoreConfig()
{
File tempH2DbDir = Path.of(System.getProperty("java.io.tmpdir"), "h2db-" + System.currentTimeMillis()).toFile();
tempH2DbDir.deleteOnExit();
String jdbcUrl = "jdbc:h2:" + tempH2DbDir.getAbsolutePath();
String jdbcUrl = "jdbc:h2:" + tempH2DbDir.getAbsolutePath() + ";NON_KEYWORDS=NAME,VALUE";
HaGatewayTestUtils.seedRequiredData(tempH2DbDir.getAbsolutePath());
return new DataStoreConfiguration(jdbcUrl, "sa", "sa", "org.h2.Driver", 4, false);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ void testGatewayManager()
assertThat(haGatewayManager.getActiveBackends("adhoc")).isEmpty();
assertThat(haGatewayManager.getAllBackends())
.extracting(ProxyBackendConfiguration::getRoutingGroup)
.containsExactly("adhoc", "etl");
.containsExactly("etl", "adhoc");

// Delete a backend
haGatewayManager.deleteBackend("adhoc1");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ void testCreateGlobalProperties()
}
catch (Exception ex) {
assertThat(ex.getCause())
.isInstanceOf(org.h2.jdbc.JdbcSQLException.class)
.isInstanceOf(org.h2.jdbc.JdbcSQLIntegrityConstraintViolationException.class)
.hasMessageStartingWith("Check constraint violation:");
}
}
Expand Down Expand Up @@ -330,7 +330,7 @@ void testUpdateGlobalProperties()
}
catch (Exception ex) {
assertThat(ex.getCause())
.isInstanceOf(org.h2.jdbc.JdbcSQLException.class)
.isInstanceOf(org.h2.jdbc.JdbcSQLIntegrityConstraintViolationException.class)
.hasMessageStartingWith("Check constraint violation:");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ void setUp()
specificDb = "h2db-" + System.currentTimeMillis();
File tempH2DbDir = Path.of(System.getProperty("java.io.tmpdir"), specificDb).toFile();
tempH2DbDir.deleteOnExit();
String jdbcUrl = "jdbc:h2:" + tempH2DbDir.getAbsolutePath();
String jdbcUrl = "jdbc:h2:" + tempH2DbDir.getAbsolutePath() + ";NON_KEYWORDS=NAME,VALUE";
HaGatewayTestUtils.seedRequiredData(tempH2DbDir.getAbsolutePath());
DataStoreConfiguration db = new DataStoreConfiguration(jdbcUrl, "sa",
"sa", "org.h2.Driver", 4, false);
Expand Down