Skip to content

Commit

Permalink
Tiny lint+format fix in gossip leaderElection tests
Browse files Browse the repository at this point in the history
- Missing s in %s message formatting
- golint complained about a variable name

Change-Id: I933059d6200736c069d4cce8940cb5b09e3c098d
Signed-off-by: Yacov Manevich <yacovm@il.ibm.com>
  • Loading branch information
yacovm committed Feb 18, 2017
1 parent 1bc90b9 commit dce0aef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions gossip/election/adapter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ func TestAdapterImpl_Gossip(t *testing.T) {

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

for peerId, adapter := range adapters {
channels[peerId] = adapter.Accept()
for peerID, adapter := range adapters {
channels[peerID] = adapter.Accept()
}

sender := adapters[fmt.Sprintf("Peer%d", 0)]
Expand Down
2 changes: 1 addition & 1 deletion gossip/election/election_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ func TestPartition(t *testing.T) {
assert.Equal(t, "p0", leaders[0])
for _, p := range peers {
if p.id == leaders[0] {
assert.True(t, p.isLeaderFromCallback, "Leadership callback result is wrong for %", p.id)
assert.True(t, p.isLeaderFromCallback, "Leadership callback result is wrong for %s", p.id)
} else {
assert.False(t, p.isLeaderFromCallback, "Leadership callback result is wrong for %s", p.id)
assert.True(t, p.callbackInvoked, "Leadership callback wasn't invoked for %s", p.id)
Expand Down

0 comments on commit dce0aef

Please sign in to comment.