Revise failing analyzers test

We were sniffing for the wrong method. Also reduced time.Sleep
needed to make sure query is registered from 10s to 10ms.
This commit is contained in:
ionutboangiu
2024-04-08 18:27:24 +03:00
committed by Dan Christian Bogos
parent a5d29d5d7b
commit 8ba8bfcff4

View File

@@ -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))