Atlas › Test

TestGenerateWorkflowID

Exact test identity: go.temporal.io/server/common/schedules/TestGenerateWorkflowID

Package
go.temporal.io/server/common/schedules
Suite / test hierarchy
TestGenerateWorkflowID
Test
TestGenerateWorkflowID
Introduced at
id.go ×1 Frontier kind: Joint frontier
Covered ranges
1
Covered lines
4
Covered files
1

Covered source

Expand a file to inspect source; the > gutter marks covered lines.

go.temporal.io/server/common/schedules/id.go 4 covered LOC · 1 range

Open complete file

40 // GenerateWorkflowID generates a deterministic workflow ID for a buffered
41 // action by combining the base workflow ID with the truncated nominal time.
42 > func GenerateWorkflowID(baseWorkflowID string, nominalTime time.Time) string { id.go
43 > nominalTimeSec := nominalTime.Truncate(time.Second)
44 > return fmt.Sprintf("%s-%s", baseWorkflowID, nominalTimeSec.UTC().Format(time.RFC3339))
45 > }
46
47 // GenerateBackfillerID generates a unique ID for a Backfiller component.