Skip to content

Commit

Permalink
[apache#29895][Go SDK] Update timer test function names. (apache#29896)
Browse files Browse the repository at this point in the history
* Update timer test function names.

* Remove leaked debug print.

---------

Co-authored-by: lostluck <[email protected]>
  • Loading branch information
lostluck and lostluck authored Jan 2, 2024
1 parent 1c1cfa8 commit 6751a17
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
9 changes: 4 additions & 5 deletions sdks/go/test/integration/primitives/timers.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ func init() {
register.DoFn6x0[beam.Window, state.Provider, timers.Provider, string, int, func(kv[string, int])](&eventTimeFn{})
register.Emitter2[string, int]()
register.Emitter1[kv[string, int]]()
register.Iter1[int]()
}

type kv[K, V any] struct {
Expand Down Expand Up @@ -139,13 +138,13 @@ func timersEventTimePipelineBuilder(makeImp func(s beam.Scope) beam.PCollection)
}
}

// TimersEventTime_Bounded validates event time timers in a bounded pipeline.
func TimersEventTime_Bounded(s beam.Scope) {
// TimersEventTimeBounded validates event time timers in a bounded pipeline.
func TimersEventTimeBounded(s beam.Scope) {
timersEventTimePipelineBuilder(beam.Impulse)(s)
}

// TimersEventTime_Bounded validates event time timers in an unbounded pipeline.
func TimersEventTime_Unbounded(s beam.Scope) {
// TimersEventTimeUnbounded validates event time timers in an unbounded pipeline.
func TimersEventTimeUnbounded(s beam.Scope) {
timersEventTimePipelineBuilder(func(s beam.Scope) beam.PCollection {
now := time.Now()
return periodic.Impulse(s, now, now.Add(10*time.Second), 0, false)
Expand Down
4 changes: 2 additions & 2 deletions sdks/go/test/integration/primitives/timers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ import (

func TestTimers_EventTime_Bounded(t *testing.T) {
integration.CheckFilters(t)
ptest.BuildAndRun(t, TimersEventTime_Bounded)
ptest.BuildAndRun(t, TimersEventTimeBounded)
}

func TestTimers_EventTime_Unbounded(t *testing.T) {
integration.CheckFilters(t)
ptest.BuildAndRun(t, TimersEventTime_Unbounded)
ptest.BuildAndRun(t, TimersEventTimeUnbounded)
}

// TODO(https://github.com/apache/beam/issues/29772): Add ProcessingTime Timer tests.

0 comments on commit 6751a17

Please sign in to comment.