@@ -6061,7 +6061,7 @@ func Test_Client_RetryPolicy(t *testing.T) {
60616061
60626062 client := newTestClient (t , dbPool , config )
60636063
6064- now := client .baseService .Time .StubNowUTC (time .Now ().UTC ())
6064+ now := client .baseService .Time .StubNow (time .Now ().UTC ())
60656065 t .Logf ("Now: %s" , now )
60666066
60676067 subscribeChan , cancel := client .Subscribe (EventKindJobCompleted , EventKindJobFailed )
@@ -6736,7 +6736,7 @@ func Test_Client_InsertNotificationsAreDeduplicatedAndDebounced(t *testing.T) {
67366736 riversharedtest .WaitOrTimeout (t , client .baseStartStop .Started ())
67376737 // Anchor all limiter checks to a known base time so debounce behavior is
67386738 // independent from scheduler jitter or machine load.
6739- now := client .baseService .Time .StubNowUTC (time .Now ().UTC ())
6739+ now := client .baseService .Time .StubNow (time .Now ().UTC ())
67406740
67416741 type insertPayload struct {
67426742 Queue string `json:"queue"`
@@ -6771,7 +6771,7 @@ func Test_Client_InsertNotificationsAreDeduplicatedAndDebounced(t *testing.T) {
67716771 // Keep time fixed inside the cooldown window before issuing repeated queue1
67726772 // inserts. This guarantees that all of these inserts are ineligible for a
67736773 // second notification regardless of wall-clock runtime.
6774- client .baseService .Time .StubNowUTC (now .Add (500 * time .Millisecond ))
6774+ client .baseService .Time .StubNow (now .Add (500 * time .Millisecond ))
67756775
67766776 for range 5 {
67776777 config .Logger .InfoContext (ctx , "inserting queue1 job" )
@@ -6791,7 +6791,7 @@ func Test_Client_InsertNotificationsAreDeduplicatedAndDebounced(t *testing.T) {
67916791 expectImmediateNotification (t , "queue3" ) // Immediate first fire on queue3
67926792
67936793 // `ShouldTrigger` uses a strict `Before` check; move just past the boundary.
6794- client .baseService .Time .StubNowUTC (now .Add (config .FetchCooldown + time .Nanosecond ))
6794+ client .baseService .Time .StubNow (now .Add (config .FetchCooldown + time .Nanosecond ))
67956795
67966796 // Now queue1 should immediately notify again.
67976797 expectImmediateNotification (t , "queue1" )
@@ -6846,7 +6846,7 @@ func Test_Client_JobCompletion(t *testing.T) {
68466846
68476847 client , bundle := setup (t , config )
68486848
6849- now := client .baseService .Time .StubNowUTC (time .Now ().UTC ())
6849+ now := client .baseService .Time .StubNow (time .Now ().UTC ())
68506850
68516851 insertRes , err := client .Insert (ctx , JobArgs {}, nil )
68526852 require .NoError (t , err )
@@ -6919,7 +6919,7 @@ func Test_Client_JobCompletion(t *testing.T) {
69196919
69206920 client , bundle := setup (t , config )
69216921
6922- now := client .baseService .Time .StubNowUTC (time .Now ().UTC ())
6922+ now := client .baseService .Time .StubNow (time .Now ().UTC ())
69236923
69246924 insertRes , err := client .Insert (ctx , JobArgs {}, nil )
69256925 require .NoError (t , err )
@@ -6951,7 +6951,7 @@ func Test_Client_JobCompletion(t *testing.T) {
69516951
69526952 client , bundle := setup (t , config )
69536953
6954- now := client .baseService .Time .StubNowUTC (time .Now ().UTC ())
6954+ now := client .baseService .Time .StubNow (time .Now ().UTC ())
69556955
69566956 insertRes , err := client .Insert (ctx , JobArgs {}, nil )
69576957 require .NoError (t , err )
@@ -7013,7 +7013,7 @@ func Test_Client_JobCompletion(t *testing.T) {
70137013
70147014 client , bundle := setup (t , newTestConfig (t , "" ))
70157015
7016- now := client .baseService .Time .StubNowUTC (time .Now ().UTC ())
7016+ now := client .baseService .Time .StubNow (time .Now ().UTC ())
70177017
70187018 type JobArgs struct {
70197019 testutil.JobArgsReflectKind [JobArgs ]
@@ -8117,7 +8117,7 @@ func TestInsertParamsFromJobArgsAndOptions(t *testing.T) {
81178117 t .Parallel ()
81188118
81198119 archetype := riversharedtest .BaseServiceArchetype (t )
8120- archetype .Time .StubNowUTC (time .Now ().UTC ())
8120+ archetype .Time .StubNow (time .Now ().UTC ())
81218121
81228122 uniqueOpts := UniqueOpts {
81238123 ByArgs : true ,
@@ -8147,7 +8147,7 @@ func TestInsertParamsFromJobArgsAndOptions(t *testing.T) {
81478147 t .Parallel ()
81488148
81498149 archetype := riversharedtest .BaseServiceArchetype (t )
8150- archetype .Time .StubNowUTC (time .Now ().UTC ())
8150+ archetype .Time .StubNow (time .Now ().UTC ())
81518151
81528152 states := []rivertype.JobState {
81538153 rivertype .JobStateAvailable ,
@@ -8465,7 +8465,7 @@ func TestUniqueOpts(t *testing.T) {
84658465 // the current time, but make sure it's nicened up a little to be
84668466 // roughly in the middle of the hour and well clear of any period
84678467 // boundaries.
8468- client .baseService .Time .StubNowUTC (
8468+ client .baseService .Time .StubNow (
84698469 time .Now ().Truncate (1 * time .Hour ).Add (37 * time .Minute + 23 * time .Second + 123 * time .Millisecond ).UTC (),
84708470 )
84718471
0 commit comments