Skip to content

Commit

Permalink
test fix attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
Amogh-Bharadwaj committed Mar 20, 2024
1 parent 10c43cf commit a351109
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions flow/e2e/snowflake/peer_flow_sf_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1127,7 +1127,7 @@ func (s PeerFlowE2ETestSuiteSF) Test_Interval_SF() {
dstTableName := fmt.Sprintf("%s.%s", s.sfHelper.testSchemaName, "testintervalsf")

_, err := s.Conn().Exec(context.Background(), fmt.Sprintf(`
CREATE TABLE IF NOT EXISTS e2e_test_%s."%s" (
CREATE TABLE IF NOT EXISTS e2e_test_%s.%s (
id SERIAL PRIMARY KEY,
dur INTERVAL
);
Expand All @@ -1141,14 +1141,14 @@ func (s PeerFlowE2ETestSuiteSF) Test_Interval_SF() {
}

flowConnConfig := connectionGen.GenerateFlowConnectionConfigs()
flowConnConfig.MaxBatchSize = 100
flowConnConfig.MaxBatchSize = 5

// wait for PeerFlowStatusQuery to finish setup
env := e2e.ExecutePeerflow(tc, peerflow.CDCFlowWorkflow, flowConnConfig, nil)
e2e.SetupCDCFlowStatusQuery(s.t, env, connectionGen)

_, err = s.Conn().Exec(context.Background(), fmt.Sprintf(`
INSERT INTO e2e_test_%s."%s"(dur)
INSERT INTO e2e_test_%s.%s(dur)
SELECT
make_interval(
20,
Expand All @@ -1161,6 +1161,14 @@ func (s PeerFlowE2ETestSuiteSF) Test_Interval_SF() {
e2e.EnvNoError(s.t, env, err)

s.t.Log("Inserted a row into the source table")
e2e.EnvWaitForEqualTablesWithNames(
env,
s,
"normalize interval type",
"testintervalsf",
"testintervalsf",
"id",
)
env.Cancel()
e2e.RequireEnvCanceled(s.t, env)
err = s.checkJSONValue(dstTableName, "dur", "days", "20")
Expand Down

0 comments on commit a351109

Please sign in to comment.