Skip to content

Commit 2e5b723

Browse files
committed
disable smart reset for grapql cs
1 parent 9275b1c commit 2e5b723

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

jdk_11_gradle/em/embedded/graphql/patio-api/src/main/java/em/embedded/patio/EmbeddedEvoMasterController.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,9 @@ public String startSut() {
9797
dbSpecification = Arrays.asList(new DbSpecification(){{
9898
dbType = DatabaseType.POSTGRES;
9999
schemaNames = Arrays.asList("public");
100-
initSqlOnResourcePath = "/initDb.sql";
100+
// initSqlOnResourcePath = "/initDb.sql";
101+
connection = sqlConnection;
102+
employSmartDbClean = false;
101103
}});
102104

103105
return "http://localhost:" + getSutPort();
@@ -130,8 +132,8 @@ public String getPackagePrefixesToCover() {
130132

131133
@Override
132134
public void resetStateOfSUT() {
133-
// DbCleaner.clearDatabase_Postgres(connection, "public", List.of("flyway_schema_history"));
134-
// SqlScriptRunnerCached.runScriptFromResourceFile(connection,"/initDB.sql");
135+
DbCleaner.clearDatabase_Postgres(sqlConnection, "public", List.of("flyway_schema_history"));
136+
SqlScriptRunnerCached.runScriptFromResourceFile(sqlConnection,"/initDB.sql");
135137
}
136138

137139
@Override

jdk_8_maven/em/embedded/graphql/spring-petclinic-graphql/src/main/java/em/embedded/org/springframework/samples/petclinic/EmbeddedEvoMasterController.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ public String startSut() {
9696
dbType = DatabaseType.POSTGRES;
9797
connection = sqlConnection;
9898
schemaNames = Arrays.asList("public");
99-
initSqlOnResourcePath = "/db/postgresql/populateDB.sql";
99+
//initSqlOnResourcePath = "/db/postgresql/populateDB.sql";
100+
employSmartDbClean = false;
100101
}});
101102

102103

@@ -129,8 +130,8 @@ public String getPackagePrefixesToCover() {
129130

130131
@Override
131132
public void resetStateOfSUT() {
132-
// DbCleaner.clearDatabase_Postgres(connection,"public", null);
133-
// SqlScriptRunnerCached.runScriptFromResourceFile(connection,"/db/postgresql/populateDB.sql");
133+
DbCleaner.clearDatabase_Postgres(sqlConnection,"public", null);
134+
SqlScriptRunnerCached.runScriptFromResourceFile(sqlConnection,"/db/postgresql/populateDB.sql");
134135
}
135136

136137
@Override

0 commit comments

Comments
 (0)