You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please specify real version numbers or git SHAs, not just "Latest" since that changes fairly regularly.
Sarama Version: 02452b3987ac0e7b93702149e96d4f9b2e6521ec
Kafka Version: not applicable
Go Version: go version go1.7.3
Problem Description
The MR #677 brought the SendMessages function and its mock counterpart. Now the test didn't really test assertions in the form of:
But I don't know if that would be the correct fix. Another way to fix this just by editing this line:
expectations := sp.expectations[0 : len(msgs)-1]
to
expectations := sp.expectations[0 : len(msgs)]
If there's 1 message, a slice from 0 to 1 - 1 is going to be an empty slice.
But this fix does not make the SendMessages actually use the expectation.CheckFunction.
I can write a minimal test for this if this description was too confusing, and a merge request if someone tells me the preferred way to fix this.
The text was updated successfully, but these errors were encountered:
Versions
Please specify real version numbers or git SHAs, not just "Latest" since that changes fairly regularly.
Sarama Version:
02452b3987ac0e7b93702149e96d4f9b2e6521ec
Kafka Version:
not applicable
Go Version:
go version go1.7.3
Problem Description
The MR #677 brought the
SendMessages
function and its mock counterpart. Now the test didn't really test assertions in the form of:So somewhere in the history of this file, it stopped working.
If I change the mock to use the sister function
SendMessage
, my tests work:But I don't know if that would be the correct fix. Another way to fix this just by editing this line:
to
If there's 1 message, a slice from
0
to1 - 1
is going to be an empty slice.But this fix does not make the
SendMessages
actually use theexpectation.CheckFunction
.I can write a minimal test for this if this description was too confusing, and a merge request if someone tells me the preferred way to fix this.
The text was updated successfully, but these errors were encountered: