Skip to content

Commit

Permalink
Revise failing analyzers test
Browse files Browse the repository at this point in the history
We were sniffing for the wrong method. Also reduced time.Sleep
needed to make sure query is registered from 10s to 10ms.
  • Loading branch information
ionutboangiu authored and danbogos committed Apr 8, 2024
1 parent a5d29d5 commit 8ba8bfc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions analyzers/analyzers_it_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,9 @@ func testAnalyzerSV1BirPCSession(t *testing.T) {
err.Error() != utils.ErrPartiallyExecuted.Error() {
t.Fatal(err)
}
time.Sleep(10 * time.Second)
time.Sleep(10 * time.Millisecond)
var result []map[string]any
if err := anzRPC.Call(context.Background(), utils.AnalyzerSv1StringQuery, &QueryArgs{HeaderFilters: `+RequestEncoding:\*birpc_json +RequestMethod:"SessionSv1.DisconnectPeer"`}, &result); err != nil {
if err := anzRPC.Call(context.Background(), utils.AnalyzerSv1StringQuery, &QueryArgs{HeaderFilters: `+RequestEncoding:\*birpc_json +RequestMethod:"AgentV1.DisconnectPeer"`}, &result); err != nil {
t.Error(err)
} else if len(result) != 1 {
t.Errorf("Unexpected result: %s", utils.ToJSON(result))
Expand Down

0 comments on commit 8ba8bfc

Please sign in to comment.