Skip to content
This repository was archived by the owner on Jun 5, 2021. It is now read-only.

Commit 68f3da9

Browse files
committed
Unlambda test functions
No need to wrap these functions, they already have a matching signature.
1 parent 0993231 commit 68f3da9

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

client_test.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1275,9 +1275,7 @@ func TestClientRTOAgentErr(t *testing.T) {
12751275
connL, connR := net.Pipe()
12761276
defer connL.Close()
12771277
collector := new(manualCollector)
1278-
clock := callbackClock(func() time.Time {
1279-
return time.Now()
1280-
})
1278+
clock := callbackClock(time.Now)
12811279
agent := &manualAgent{}
12821280
attempt := 0
12831281
gotReads := make(chan struct{})
@@ -1341,9 +1339,7 @@ func TestClient_HandleProcessError(t *testing.T) {
13411339
connL, connR := net.Pipe()
13421340
defer connL.Close()
13431341
collector := new(manualCollector)
1344-
clock := callbackClock(func() time.Time {
1345-
return time.Now()
1346-
})
1342+
clock := callbackClock(time.Now)
13471343
agent := &manualAgent{}
13481344
gotWrites := make(chan struct{})
13491345
processCalled := make(chan struct{}, 1)

helpers_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,7 @@ func TestMessage_ForEach(t *testing.T) {
192192
m = newMessage()
193193
var realm Realm
194194
testutil.ShouldNotAllocate(t, func() {
195-
if err := m.ForEach(AttrRealm, func(m *Message) error {
196-
return realm.GetFrom(m)
197-
}); err != nil {
195+
if err := m.ForEach(AttrRealm, realm.GetFrom); err != nil {
198196
t.Fatal(err)
199197
}
200198
})

0 commit comments

Comments
 (0)