mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
adding time.Sleep in dispatcher tests
This commit is contained in:
committed by
Dan Christian Bogos
parent
6b530e94b7
commit
b9fcf8b24e
@@ -96,6 +96,7 @@ func (d *testDispatcher) stopEngine(t *testing.T) {
|
||||
if err := exec.Command("kill", "-9", pid).Run(); err != nil {
|
||||
t.Fatalf("Error at stop engine:%v\n", err)
|
||||
}
|
||||
time.Sleep(200 * time.Millisecond)
|
||||
// // if err := d.cmd.Process.Kill(); err != nil {
|
||||
// // t.Fatalf("Error at stop engine:%v\n", err)
|
||||
// }
|
||||
|
||||
@@ -24,6 +24,7 @@ package dispatchers
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/cgrates/cgrates/utils"
|
||||
)
|
||||
@@ -159,6 +160,7 @@ func testDspResponderShutdown(t *testing.T) {
|
||||
} else if reply != "Done!" {
|
||||
t.Errorf("Received: %s", utils.ToJSON(reply))
|
||||
}
|
||||
time.Sleep(200 * time.Millisecond)
|
||||
if err := dispEngine.RPC.Call(utils.CoreSv1Status, &ev, &statusReply); err != nil {
|
||||
t.Error(err)
|
||||
} else if statusReply[utils.NodeID] != "ALL2" {
|
||||
|
||||
Reference in New Issue
Block a user