Skip to content

Commit

Permalink
shard_basic test - check shardkey autodisc in log
Browse files Browse the repository at this point in the history
  • Loading branch information
rsh-yam authored Jan 6, 2024
1 parent 7e12551 commit 2263aca
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tests/functionaltest/sharding_tests/shard_basic/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,13 @@ func TestShardBasic(t *testing.T) {
t.Fatalf ("Error: No Shard key event for fetch request in CAL");
}

fmt.Println ("Check CAL log for correct events");
cal_count = testutil.RegexCountFile ("SHARDING.*shard_key_auto_discovery.*0.*shardkey=accountid|12346&shardid=3&scuttleid=", "cal.log")
if (cal_count < 1) {
t.Fatalf ("Error: No shard_key_auto_discovery event seen in CAL");
fmt.Println ("Check log for shard key auto discovery");
count = testutil.RegexCount ("shard key auto discovery: shardkey=accountid|12346&shardid=3&scuttleid=")
if (count < 1) {
t.Fatalf ("Error: Did NOT get shard key auto discovery in log");
}

fmt.Println ("Check CAL log for correct events")
cal_count = testutil.RegexCountFile ("T.*API.*CLIENT_SESSION_3", "cal.log")
if (cal_count < 1) {
t.Fatalf ("Error: Request is not executed by shard 3 as expected");
Expand Down

0 comments on commit 2263aca

Please sign in to comment.