time.Sleep(time.Duration(5) * time.Second)
code := m.Run()
os.Exit(code)
}
func TestGetHealthCheckRetursServiceUnavailableError(t *testing.T) {
time.Sleep(time.Duration(5) * time.Second)
code := m.Run()
os.Exit(code)
}
func TestGetHealthCheckRetursServiceUnavailableError(t *testing.T) {
req, _ := http.NewRequest("GET", "/ric/v1/health/ready", nil)
/*response :=*/ executeRequest(req)
req, _ := http.NewRequest("GET", "/ric/v1/health/ready", nil)
/*response :=*/ executeRequest(req)
stats := getMetrics(t)
if !strings.Contains(stats, "ricxapp_RMR_Transmitted 100") {
t.Errorf("Error: ricxapp_RMR_Transmitted value incorrect: %v", stats)
stats := getMetrics(t)
if !strings.Contains(stats, "ricxapp_RMR_Transmitted 100") {
t.Errorf("Error: ricxapp_RMR_Transmitted value incorrect: %v", stats)
time.Sleep(time.Duration(5) * time.Second)
whid := Rmr.Openwh("localhost:4560")
time.Sleep(time.Duration(1) * time.Second)
time.Sleep(time.Duration(5) * time.Second)
whid := Rmr.Openwh("localhost:4560")
time.Sleep(time.Duration(1) * time.Second)
stats := getMetrics(t)
if !strings.Contains(stats, "ricxapp_RMR_Transmitted 200") {
t.Errorf("Error: ricxapp_RMR_Transmitted value incorrect: %v", stats)
stats := getMetrics(t)
if !strings.Contains(stats, "ricxapp_RMR_Transmitted 200") {
t.Errorf("Error: ricxapp_RMR_Transmitted value incorrect: %v", stats)
stats := getMetrics(t)
if !strings.Contains(stats, "ricxapp_RMR_Transmitted 200") {
t.Errorf("Error: ricxapp_RMR_Transmitted value incorrect: %v", stats)
stats := getMetrics(t)
if !strings.Contains(stats, "ricxapp_RMR_Transmitted 200") {
t.Errorf("Error: ricxapp_RMR_Transmitted value incorrect: %v", stats)
id, ok := Rmr.GetRicMessageId("RIC_SUB_REQ")
if !ok || id != 12010 {
t.Errorf("Error: GetRicMessageId failed: id=%d", id)
id, ok := Rmr.GetRicMessageId("RIC_SUB_REQ")
if !ok || id != 12010 {
t.Errorf("Error: GetRicMessageId failed: id=%d", id)
id, ok := Rmr.GetRicMessageId("RIC_SUB_REQ")
if !ok || id != 12010 {
t.Errorf("Error: GetRicMessageId failed: id=%d", id)
id, ok := Rmr.GetRicMessageId("RIC_SUB_REQ")
if !ok || id != 12010 {
t.Errorf("Error: GetRicMessageId failed: id=%d", id)