mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-09 22:47:24 +00:00
Fixes #7176. Some of the benchmarks create a bunch of different subscriptions all sharing the same query. These were all using the same client ID, which violates one of the subscriber rules. Ensure each subscriber gets a unique ID. This has been broken as long as this library has been in the repo—I tracked it back tobb9aa85dand it was already failing there, so I think this never really worked. I'm not sure these test anything useful, but at least now they run. (cherry picked from commit1fd7060542) Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
This commit is contained in:
@@ -518,7 +518,8 @@ func benchmarkNClientsOneQuery(n int, b *testing.B) {
|
||||
ctx := context.Background()
|
||||
q := query.MustParse("abci.Account.Owner = 'Ivan' AND abci.Invoices.Number = 1")
|
||||
for i := 0; i < n; i++ {
|
||||
subscription, err := s.Subscribe(ctx, clientID, q)
|
||||
id := fmt.Sprintf("clientID-%d", i+1)
|
||||
subscription, err := s.Subscribe(ctx, id, q)
|
||||
if err != nil {
|
||||
b.Fatal(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user