84
}
85
87
>
sourceCluster := shuffle.String(testHistoryReplicationTaskDLQSourceCluster)
88
>
shardID := rand.Int31()
89
>
taskID := int64(1)
90
>
91
>
task := s.newRandomReplicationTasksDLQRow(sourceCluster, shardID, taskID)
92
>
result, err := s.store.InsertIntoReplicationDLQTasks(newExecutionContext(), []sqlplugin.ReplicationDLQTasksRow{task})
93
>
s.NoError(err)
94
>
rowsAffected, err := result.RowsAffected()
95
>
s.NoError(err)
96
>
s.Equal(1, int(rowsAffected))
97
>
98
>
task = s.newRandomReplicationTasksDLQRow(sourceCluster, shardID, taskID)
99
>
_, err = s.store.InsertIntoReplicationDLQTasks(newExecutionContext(), []sqlplugin.ReplicationDLQTasksRow{task})
100
>
s.Error(err) // TODO persistence layer should do proper error translation
101
>
}
102
103
func (s *historyHistoryReplicationDLQTaskSuite) TestInsert_Multiple_Fail_Duplicate() {