Skip to content

Commit

Permalink
Merge pull request #209 from dkropachev/dk/tablet-test-to-return-more…
Browse files Browse the repository at this point in the history
…-details

Make tablet test provide more details on failure
  • Loading branch information
sylwiaszunejko authored Jul 8, 2024
2 parents fbccf92 + 1d1ee11 commit c2e98cb
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tablet_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ func TestTablets(t *testing.T) {
}
}

assertEqual(t, "queriedHosts", 1, queriedHosts)
if queriedHosts != 1 {
t.Fatalf("trace should show only one host but it showed %d hosts, hosts: %s trace:\n%s", queriedHosts, hostAddresses, buf.String())
}
}
}

Expand Down Expand Up @@ -123,12 +125,14 @@ func TestTabletsShardAwareness(t *testing.T) {
allShards := make(map[string]bool)
shardList := []string{}
for _, item := range shards {
if _, value := allShards[item]; !value {
if !allShards[item] {
allShards[item] = true
shardList = append(shardList, item)
}
}

assertEqual(t, "shardList", 1, len(shardList))
if len(shardList) != 1 {
t.Fatalf("trace should show only one shard but it showed %d shards, shards: %s trace:\n%s", len(shardList), shardList, buf.String())
}
}
}

0 comments on commit c2e98cb

Please sign in to comment.