From 0ddfc5c486bb8d877c8ef29bbdeeb7875fbdef0e Mon Sep 17 00:00:00 2001 From: Kevin Biju Date: Thu, 28 Sep 2023 23:41:11 +0530 Subject: [PATCH] fixing non-existing table test, errors now --- flow/connectors/postgres/postgres_cdc_test.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/flow/connectors/postgres/postgres_cdc_test.go b/flow/connectors/postgres/postgres_cdc_test.go index ddc9dc3d82..2735c5ff49 100644 --- a/flow/connectors/postgres/postgres_cdc_test.go +++ b/flow/connectors/postgres/postgres_cdc_test.go @@ -448,9 +448,11 @@ func (suite *PostgresCDCTestSuite) TestErrorForTableNotExist() { TableNameSchemaMapping: tableNameSchemaMapping, RelationMessageMapping: relationMessageMapping, }) - suite.Equal(0, len(recordsWithSchemaDelta.RecordBatch.Records)) - suite.Nil(recordsWithSchemaDelta.TableSchemaDelta) - suite.Nil(err) + suite.Nil(recordsWithSchemaDelta) + suite.Errorf( + err, + "error while closing statement batch: ERROR: relation \"%s\" does not exist (SQLSTATE 42P01)", + nonExistentFlowSrcTableName) err = suite.connector.PullFlowCleanup(nonExistentFlowName) suite.failTestError(err)