Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add unit test for cassandra workflow utils part-3 #5506

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions common/persistence/nosql/nosqlplugin/cassandra/workflow_cql.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ const (
`}`

templateActivityInfoType = `{` +
`version: ?,` +
`version: ?, ` +
`schedule_id: ?, ` +
`scheduled_event_batch_id: ?, ` +
`scheduled_event: ?, ` +
Expand Down Expand Up @@ -172,7 +172,7 @@ const (
`}`

templateTimerInfoType = `{` +
`version: ?,` +
`version: ?, ` +
`timer_id: ?, ` +
`started_id: ?, ` +
`expiry_time: ?, ` +
Expand Down Expand Up @@ -220,10 +220,10 @@ const (
`}`

templateUpdateCurrentWorkflowExecutionQuery = `UPDATE executions USING TTL 0 ` +
`SET current_run_id = ?,
execution = {run_id: ?, create_request_id: ?, state: ?, close_status: ?},
workflow_last_write_version = ?,
workflow_state = ? ` +
`SET current_run_id = ?, ` +
`execution = {run_id: ?, create_request_id: ?, state: ?, close_status: ?}, ` +
`workflow_last_write_version = ?, ` +
`workflow_state = ? ` +
`WHERE shard_id = ? ` +
`and type = ? ` +
`and domain_id = ? ` +
Expand Down Expand Up @@ -333,7 +333,7 @@ workflow_state = ? ` +
`IF next_event_id = ? `

templateUpdateActivityInfoQuery = `UPDATE executions ` +
`SET activity_map[ ? ] =` + templateActivityInfoType + ` ` +
`SET activity_map[ ? ] = ` + templateActivityInfoType + ` ` +
`WHERE shard_id = ? ` +
`and type = ? ` +
`and domain_id = ? ` +
Expand All @@ -343,7 +343,7 @@ workflow_state = ? ` +
`and task_id = ? `

templateResetActivityInfoQuery = `UPDATE executions ` +
`SET activity_map = ?` +
`SET activity_map = ? ` +
`WHERE shard_id = ? ` +
`and type = ? ` +
`and domain_id = ? ` +
Expand All @@ -353,7 +353,7 @@ workflow_state = ? ` +
`and task_id = ? `

templateUpdateTimerInfoQuery = `UPDATE executions ` +
`SET timer_map[ ? ] =` + templateTimerInfoType + ` ` +
`SET timer_map[ ? ] = ` + templateTimerInfoType + ` ` +
`WHERE shard_id = ? ` +
`and type = ? ` +
`and domain_id = ? ` +
Expand All @@ -363,7 +363,7 @@ workflow_state = ? ` +
`and task_id = ? `

templateResetTimerInfoQuery = `UPDATE executions ` +
`SET timer_map = ?` +
`SET timer_map = ? ` +
`WHERE shard_id = ? ` +
`and type = ? ` +
`and domain_id = ? ` +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1447,7 +1447,7 @@ func mustConvertToSlice(value interface{}) []interface{} {
}
return result
default:
panic(fmt.Sprintf("Unable to convert %v to slice", value))
panic(fmt.Sprintf("Unable to convert %v to slice which is of type %T", value, value))
}
}

Expand Down
Loading