Skip to content

Commit 1e72771

Browse files
committed
fix external
1 parent 2e5b723 commit 1e72771

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

jdk_11_gradle/em/external/graphql/patio-api/src/main/java/em/external/patio/ExternalEvoMasterController.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,9 @@ public void postStart() {
156156
dbSpecification = Arrays.asList(new DbSpecification(){{
157157
dbType = DatabaseType.POSTGRES;
158158
schemaNames = Arrays.asList("public");
159-
initSqlOnResourcePath = "/initDb.sql";
159+
// initSqlOnResourcePath = "/initDb.sql";
160+
connection = sqlConnection;
161+
employSmartDbClean = false;
160162
}});
161163
} catch (Exception e) {
162164
throw new RuntimeException(e);
@@ -165,8 +167,8 @@ public void postStart() {
165167

166168
@Override
167169
public void resetStateOfSUT() {
168-
// DbCleaner.clearDatabase_Postgres(connection, "public", List.of("flyway_schema_history"));
169-
// SqlScriptRunnerCached.runScriptFromResourceFile(connection,"/initDB.sql");
170+
DbCleaner.clearDatabase_Postgres(sqlConnection, "public", List.of("flyway_schema_history"));
171+
SqlScriptRunnerCached.runScriptFromResourceFile(sqlConnection,"/initDB.sql");
170172
}
171173

172174
@Override

jdk_8_maven/em/external/graphql/spring-petclinic-graphql/src/main/java/em/external/org/springframework/samples/petclinic/ExternalEvoMasterController.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,8 @@ public void postStart() {
161161
dbType = DatabaseType.POSTGRES;
162162
connection = sqlConnection;
163163
schemaNames = Arrays.asList("public");
164-
initSqlOnResourcePath = "/db/postgresql/populateDB.sql";
164+
// initSqlOnResourcePath = "/db/postgresql/populateDB.sql";
165+
employSmartDbClean = false;
165166
}});
166167
} catch (Exception e) {
167168
throw new RuntimeException(e);
@@ -170,8 +171,8 @@ public void postStart() {
170171

171172
@Override
172173
public void resetStateOfSUT() {
173-
// DbCleaner.clearDatabase_Postgres(sqlConnection,"public", null);
174-
// SqlScriptRunnerCached.runScriptFromResourceFile(sqlConnection,"/populateDB.sql");
174+
DbCleaner.clearDatabase_Postgres(sqlConnection,"public", null);
175+
SqlScriptRunnerCached.runScriptFromResourceFile(sqlConnection,"/populateDB.sql");
175176
}
176177

177178
@Override

0 commit comments

Comments
 (0)