Skip to content

Commit ee0b70b

Browse files
committed
ignore init sql script for petclinic
1 parent 6c68931 commit ee0b70b

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,15 @@ public String startSut() {
106106
DbCleaner.clearDatabase_Postgres(sqlConnection,"public", null);
107107

108108
dbSpecification = Arrays.asList(new DbSpecification(DatabaseType.POSTGRES,sqlConnection)
109-
.withSchemas("public").withInitSqlOnResourcePath(INIT_DB_SCRIPT_PATH));
109+
.withSchemas("public")
110+
/*
111+
evomaster not support to parse `on conflict` for postgresql yet
112+
then cannot execute the sql script to initialize data in db
113+
114+
see https://www.postgresql.org/docs/current/sql-insert.html#:~:text=ON%20CONFLICT%20DO%20NOTHING%20simply,insertion%20as%20its%20alternative%20action.
115+
*/
116+
.withInitSqlOnResourcePath(INIT_DB_SCRIPT_PATH)
117+
);
110118

111119

112120

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,15 @@ public void postStart() {
170170
DbCleaner.clearDatabase_Postgres(sqlConnection,"public", null);
171171

172172
dbSpecification = Arrays.asList(new DbSpecification(DatabaseType.POSTGRES,sqlConnection)
173-
.withSchemas("public").withInitSqlOnResourcePath(INIT_DB_SCRIPT_PATH));
173+
.withSchemas("public")
174+
/*
175+
evomaster not support to parse `on conflict` for postgresql yet
176+
then cannot execute the sql script to initialize data in db
177+
178+
see https://www.postgresql.org/docs/current/sql-insert.html#:~:text=ON%20CONFLICT%20DO%20NOTHING%20simply,insertion%20as%20its%20alternative%20action.
179+
*/
180+
//.withInitSqlOnResourcePath(INIT_DB_SCRIPT_PATH)
181+
);
174182

175183

176184
} catch (Exception e) {

0 commit comments

Comments
 (0)