Skip to content

Commit

Permalink
GG-25598 Validation problem inside AbstractDefaultSchemaTest
Browse files Browse the repository at this point in the history
  • Loading branch information
korlov42 authored Nov 6, 2019
1 parent cee6a46 commit c12cda4
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import org.apache.ignite.internal.processors.cache.index.AbstractIndexingCommonTest;
import org.apache.ignite.testframework.GridTestUtils;
import org.jetbrains.annotations.Nullable;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;

Expand Down Expand Up @@ -111,10 +112,10 @@ private void executeStmtsAndVerify(Supplier<Boolean> withSchemaDecisionSup) {
sql("SELECT * FROM " + tableName(withSchemaDecisionSup.get()), res -> oneRowList(1, 5).equals(res));

sql("DELETE FROM " + tableName(withSchemaDecisionSup.get()) + " WHERE id = 1");
sql("SELECT COUNT(*) FROM " + tableName(withSchemaDecisionSup.get()), res -> oneRowList(0).equals(res));
sql("SELECT COUNT(*) FROM " + tableName(withSchemaDecisionSup.get()), res -> oneRowList(0L).equals(res));

sql("SELECT COUNT(*) FROM " + QueryUtils.SCHEMA_SYS + ".TABLES WHERE schema_name = 'PUBLIC' " +
"AND table_name = \'" + TBL_NAME + "\'", res -> oneRowList(1).equals(res));
"AND table_name = \'" + TBL_NAME + "\'", res -> oneRowList(1L).equals(res));

sql("DROP TABLE " + tableName(withSchemaDecisionSup.get()));
}
Expand All @@ -134,6 +135,6 @@ protected void sql(String qry, @Nullable Predicate<List<List<?>>> validator) {
List<List<?>> res = execSql(qry);

if (validator != null)
validator.test(res);
Assert.assertTrue(validator.test(res));
}
}

0 comments on commit c12cda4

Please sign in to comment.