Skip to content
This repository was archived by the owner on Sep 27, 2019. It is now read-only.

Commit de83ab5

Browse files
Tianyi Chenapavlo
authored andcommitted
remove the schema violation test
1 parent 15f5a36 commit de83ab5

File tree

1 file changed

+2
-17
lines changed

1 file changed

+2
-17
lines changed

test/network/exception_test.cpp

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ void *ExecutorExceptionTest(int port) {
3939
"host=127.0.0.1 port=%d user=default_database "
4040
"sslmode=disable application_name=psql",
4141
port));
42-
int exception_count = 0, total = 2;
42+
int exception_count = 0;
4343
pqxx::work txn1(C);
4444
try {
4545
txn1.exec("CREATE TABLE foo(id INT);");
@@ -53,22 +53,7 @@ void *ExecutorExceptionTest(int port) {
5353
exception_count += 1;
5454
}
5555
}
56-
pqxx::work txn2(C);
57-
try {
58-
txn2.exec("CREATE TABLE A (val1 INT, val2 INT, val3 INT, val4 INT);");
59-
txn2.exec(
60-
"INSERT INTO A (val1, val2, val3, val4, val5) VALUES (1, 1, 1, 1, "
61-
"1);");
62-
txn2.commit();
63-
} catch (const pqxx::pqxx_exception &e) {
64-
const pqxx::sql_error *s =
65-
dynamic_cast<const pqxx::sql_error *>(&e.base());
66-
if (s) {
67-
LOG_TRACE("Invalid Insert Query: %s", e.base().what());
68-
exception_count += 1;
69-
}
70-
}
71-
EXPECT_EQ(exception_count, total);
56+
EXPECT_EQ(exception_count, 1);
7257
} catch (const std::exception &e) {
7358
LOG_ERROR("[ExceptionTest] Exception occurred: %s", e.what());
7459
EXPECT_TRUE(false);

0 commit comments

Comments
 (0)