Skip to content

Commit

Permalink
fix softdel_iad, convert mixedcase
Browse files Browse the repository at this point in the history
  • Loading branch information
serprex committed Jan 5, 2024
1 parent 625c691 commit 59a3b69
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions flow/e2e/snowflake/peer_flow_sf_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1513,7 +1513,7 @@ func (s PeerFlowE2ETestSuiteSF) Test_Soft_Delete_Insert_After_Delete() {

tableName := "test_softdel_iad"
srcTableName := s.attachSchemaSuffix(tableName)
dstTableName := fmt.Sprintf("%s.%s", s.sfHelper.testSchemaName, "test_softdel_iad")
dstTableName := fmt.Sprintf("%s.%s", s.sfHelper.testSchemaName, tableName)

_, err := s.pool.Exec(context.Background(), fmt.Sprintf(`
CREATE TABLE IF NOT EXISTS %s (
Expand Down Expand Up @@ -1574,7 +1574,7 @@ func (s PeerFlowE2ETestSuiteSF) Test_Soft_Delete_Insert_After_Delete() {
_, err = s.pool.Exec(context.Background(), fmt.Sprintf(`
INSERT INTO %s(id,c1,c2,t) VALUES (1,3,4,random_string(10000))`, srcTableName))
e2e.EnvNoError(s.t, env, err)
e2e.EnvWaitForEqualTablesWithNames(env, s, "normalize reinsert", tableName, dstTableName, "id,c1,c2,t")
e2e.EnvWaitForEqualTables(env, s, "normalize reinsert", tableName, "id,c1,c2,t")

env.CancelWorkflow()
}()
Expand Down Expand Up @@ -1616,7 +1616,7 @@ func (s PeerFlowE2ETestSuiteSF) Test_Supported_Mixed_Case_Table_SF() {
require.NoError(s.t, err)

limits := peerflow.CDCFlowLimits{
ExitAfterRecords: 20,
ExitAfterRecords: -1,
MaxBatchSize: 100,
}

Expand All @@ -1634,17 +1634,17 @@ func (s PeerFlowE2ETestSuiteSF) Test_Supported_Mixed_Case_Table_SF() {
e2e.EnvNoError(s.t, env, err)
}
s.t.Log("Inserted 20 rows into the source table")
e2e.EnvWaitForEqualTablesWithNames(
env,
s,
"normalize mixed case",
"testMixedCase",
"\"testMixedCase\"",
"id,\"pulseArmor\",\"highGold\",\"eVe\"",
)

env.CancelWorkflow()
}()

env.ExecuteWorkflow(peerflow.CDCFlowWorkflowWithConfig, flowConnConfig, &limits, nil)

// Verify workflow completes without error
require.True(s.t, env.IsWorkflowCompleted())
err = env.GetWorkflowError()

// allow only continue as new error
require.Contains(s.t, err.Error(), "continue as new")

s.compareTableContentsWithDiffSelectorsSF("testMixedCase", `"pulseArmor","highGold","eVe",id`,
`"pulseArmor","highGold","eVe",id`, true)
}

0 comments on commit 59a3b69

Please sign in to comment.