Skip to content

Commit

Permalink
Fix some tests to allow cascade constraints syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
beikov committed Apr 29, 2024
1 parent 1a84ffa commit e4d7c2a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,22 +185,10 @@ public void joinTableTest() throws Exception {
* SCHEMAGENCOURSE (COURSEID)
*/

pass2a = findDataInFile(f2, new LinkedList<String>() {
private static final long serialVersionUID = 22L;
{
add("ALTER TABLE");
add("SCHEMAGEN_COURSE_STUDENT DROP");
add("STUDENTIDCONSTRAINT");
}
});
pass2b = findDataInFile(f2, new LinkedList<String>() {
private static final long serialVersionUID = 22L;
{
add("ALTER TABLE");
add("SCHEMAGEN_COURSE_STUDENT DROP");
add("COURSEIDCONSTRAINT");
}
});
pass2a = findDataInFile(f2, List.of("ALTER TABLE", "SCHEMAGEN_COURSE_STUDENT DROP", "STUDENTIDCONSTRAINT"));
pass2a = pass2a || findDataInFile(f2, List.of("DROP TABLE", "SCHEMAGEN_COURSE_STUDENT", "CASCADE CONSTRAINTS"));
pass2b = findDataInFile(f2, List.of("ALTER TABLE", "SCHEMAGEN_COURSE_STUDENT DROP", "COURSEIDCONSTRAINT"));
pass2b = pass2b || findDataInFile(f2, List.of("DROP TABLE", "SCHEMAGEN_COURSE_STUDENT", "CASCADE CONSTRAINTS"));
expected.clear();
expected.add("DROP TABLE");
expected.add("SCHEMAGEN_COURSE_STUDENT");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ public void orderColumnTest() throws Exception {
expected.add("ALTER TABLE");
expected.add("SCHEMAGENEMP DROP");
pass2c = findDataInFile(f2, expected);
pass2c = pass2c || findDataInFile(f2, List.of("DROP TABLE", "SCHEMAGENEMP", "CASCADE CONSTRAINTS"));

logger.log(Logger.Level.TRACE, "Execute the create script");
props = getPersistenceUnitProperties();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ public void secondaryTableTest() throws Exception {
expected.add("ALTER TABLE");
expected.add("SCHEMAGENSIMPLE_SECOND DROP");
pass2a = findDataInFile(f2, expected);
pass2a = pass2a || findDataInFile(f2, List.of("DROP TABLE", "SCHEMAGENSIMPLE_SECOND", "CASCADE CONSTRAINTS"));
expected.clear();
expected.add("DROP TABLE");
expected.add("SCHEMAGENSIMPLE");
Expand Down

0 comments on commit e4d7c2a

Please sign in to comment.