Skip to content

Commit dce0aef

Browse files
committed
Tiny lint+format fix in gossip leaderElection tests
- Missing s in %s message formatting - golint complained about a variable name Change-Id: I933059d6200736c069d4cce8940cb5b09e3c098d Signed-off-by: Yacov Manevich <yacovm@il.ibm.com>
1 parent 1bc90b9 commit dce0aef

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

gossip/election/adapter_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ func TestAdapterImpl_Gossip(t *testing.T) {
117117

118118
channels := make(map[string]<-chan Msg)
119119

120-
for peerId, adapter := range adapters {
121-
channels[peerId] = adapter.Accept()
120+
for peerID, adapter := range adapters {
121+
channels[peerID] = adapter.Accept()
122122
}
123123

124124
sender := adapters[fmt.Sprintf("Peer%d", 0)]

gossip/election/election_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ func TestPartition(t *testing.T) {
335335
assert.Equal(t, "p0", leaders[0])
336336
for _, p := range peers {
337337
if p.id == leaders[0] {
338-
assert.True(t, p.isLeaderFromCallback, "Leadership callback result is wrong for %", p.id)
338+
assert.True(t, p.isLeaderFromCallback, "Leadership callback result is wrong for %s", p.id)
339339
} else {
340340
assert.False(t, p.isLeaderFromCallback, "Leadership callback result is wrong for %s", p.id)
341341
assert.True(t, p.callbackInvoked, "Leadership callback wasn't invoked for %s", p.id)

0 commit comments

Comments
 (0)