@@ -164,23 +164,26 @@ func (s *cassandraErrorsSuite) TestExtractShardOwnershipLostError_Failed() {
164164 err := extractShardOwnershipLostError (map [string ]interface {}{}, rand .Int31 (), rangeID )
165165 s .NoError (err )
166166
167+ t := rowTypeExecution
167168 err = extractShardOwnershipLostError (map [string ]interface {}{
168- "type" : rowTypeExecution ,
169+ "type" : & t ,
169170 "range_id" : rangeID ,
170171 }, rand .Int31 (), rangeID )
171172 s .NoError (err )
172173
174+ t = rowTypeShard
173175 err = extractShardOwnershipLostError (map [string ]interface {}{
174- "type" : rowTypeShard ,
176+ "type" : & t ,
175177 "range_id" : rangeID ,
176178 }, rand .Int31 (), rangeID )
177179 s .NoError (err )
178180}
179181
180182func (s * cassandraErrorsSuite ) TestExtractShardOwnershipLostError_Success () {
181183 rangeID := int64 (1234 )
184+ t := rowTypeShard
182185 record := map [string ]interface {}{
183- "type" : rowTypeShard ,
186+ "type" : & t ,
184187 "range_id" : rangeID ,
185188 }
186189
@@ -195,22 +198,25 @@ func (s *cassandraErrorsSuite) TestExtractCurrentWorkflowConflictError_Failed()
195198 err := extractCurrentWorkflowConflictError (map [string ]interface {}{}, uuid .New ().String ())
196199 s .NoError (err )
197200
201+ t := rowTypeShard
198202 err = extractCurrentWorkflowConflictError (map [string ]interface {}{
199- "type" : rowTypeShard ,
203+ "type" : & t ,
200204 "run_id" : gocql .UUID (runID ),
201205 "current_run_id" : gocql .UUID (currentRunID ),
202206 }, uuid .New ().String ())
203207 s .NoError (err )
204208
209+ t = rowTypeExecution
205210 err = extractCurrentWorkflowConflictError (map [string ]interface {}{
206- "type" : rowTypeExecution ,
211+ "type" : & t ,
207212 "run_id" : gocql .UUID ([16 ]byte {}),
208213 "current_run_id" : gocql .UUID (currentRunID ),
209214 }, uuid .New ().String ())
210215 s .NoError (err )
211216
217+ t = rowTypeExecution
212218 err = extractCurrentWorkflowConflictError (map [string ]interface {}{
213- "type" : rowTypeExecution ,
219+ "type" : & t ,
214220 "run_id" : gocql .UUID (runID ),
215221 "current_run_id" : gocql .UUID (currentRunID ),
216222 }, currentRunID .String ())
@@ -223,8 +229,9 @@ func (s *cassandraErrorsSuite) TestExtractCurrentWorkflowConflictError_Success()
223229 workflowState := & persistencespb.WorkflowExecutionState {}
224230 blob , err := serialization .WorkflowExecutionStateToBlob (workflowState )
225231 s .NoError (err )
232+ t := rowTypeExecution
226233 record := map [string ]interface {}{
227- "type" : rowTypeExecution ,
234+ "type" : & t ,
228235 "run_id" : gocql .UUID (runID ),
229236 "current_run_id" : gocql .UUID (currentRunID ),
230237 "execution_state" : blob .Data ,
@@ -243,22 +250,25 @@ func (s *cassandraErrorsSuite) TestExtractWorkflowConflictError_Failed() {
243250 err := extractWorkflowConflictError (map [string ]interface {}{}, runID .String (), dbVersion , rand .Int63 ())
244251 s .NoError (err )
245252
253+ t := rowTypeShard
246254 err = extractWorkflowConflictError (map [string ]interface {}{
247- "type" : rowTypeShard ,
255+ "type" : & t ,
248256 "run_id" : gocql .UUID (runID ),
249257 "db_record_version" : dbVersion ,
250258 }, runID .String (), dbVersion + 1 , rand .Int63 ())
251259 s .NoError (err )
252260
261+ t = rowTypeExecution
253262 err = extractWorkflowConflictError (map [string ]interface {}{
254- "type" : rowTypeExecution ,
263+ "type" : & t ,
255264 "run_id" : gocql .UUID ([16 ]byte {}),
256265 "db_record_version" : dbVersion ,
257266 }, runID .String (), dbVersion + 1 , rand .Int63 ())
258267 s .NoError (err )
259268
269+ t = rowTypeExecution
260270 err = extractWorkflowConflictError (map [string ]interface {}{
261- "type" : rowTypeExecution ,
271+ "type" : & t ,
262272 "run_id" : gocql .UUID (runID ),
263273 "db_record_version" : dbVersion ,
264274 }, runID .String (), dbVersion , rand .Int63 ())
@@ -268,8 +278,9 @@ func (s *cassandraErrorsSuite) TestExtractWorkflowConflictError_Failed() {
268278func (s * cassandraErrorsSuite ) TestExtractWorkflowConflictError_Success () {
269279 runID := uuid .New ()
270280 dbVersion := rand .Int63 () + 1
281+ t := rowTypeExecution
271282 record := map [string ]interface {}{
272- "type" : rowTypeExecution ,
283+ "type" : & t ,
273284 "run_id" : gocql .UUID (runID ),
274285 "db_record_version" : dbVersion ,
275286 }
@@ -286,22 +297,25 @@ func (s *cassandraErrorsSuite) TestExtractWorkflowConflictError_Failed_NextEvent
286297 err := extractWorkflowConflictError (map [string ]interface {}{}, runID .String (), 0 , nextEventID )
287298 s .NoError (err )
288299
300+ t := rowTypeShard
289301 err = extractWorkflowConflictError (map [string ]interface {}{
290- "type" : rowTypeShard ,
302+ "type" : & t ,
291303 "run_id" : gocql .UUID (runID ),
292304 "next_event_id" : nextEventID + 1 ,
293305 }, runID .String (), 0 , nextEventID )
294306 s .NoError (err )
295307
308+ t = rowTypeExecution
296309 err = extractWorkflowConflictError (map [string ]interface {}{
297- "type" : rowTypeExecution ,
310+ "type" : & t ,
298311 "run_id" : gocql .UUID ([16 ]byte {}),
299312 "next_event_id" : nextEventID + 1 ,
300313 }, runID .String (), 0 , nextEventID )
301314 s .NoError (err )
302315
316+ t = rowTypeExecution
303317 err = extractWorkflowConflictError (map [string ]interface {}{
304- "type" : rowTypeExecution ,
318+ "type" : & t ,
305319 "run_id" : gocql .UUID (runID ),
306320 "next_event_id" : nextEventID ,
307321 }, runID .String (), 0 , nextEventID )
@@ -312,8 +326,9 @@ func (s *cassandraErrorsSuite) TestExtractWorkflowConflictError_Failed_NextEvent
312326func (s * cassandraErrorsSuite ) TestExtractWorkflowConflictError_Success_NextEventID () {
313327 runID := uuid .New ()
314328 nextEventID := int64 (1234 )
329+ t := rowTypeExecution
315330 record := map [string ]interface {}{
316- "type" : rowTypeExecution ,
331+ "type" : & t ,
317332 "run_id" : gocql .UUID (runID ),
318333 "next_event_id" : nextEventID ,
319334 }
0 commit comments