queryXappSubscription(t, int64(e2SubsId), "RAN_NAME_1", []string{"localhost:13560"})
+ mainCtrl.WaitOngoingRequestMapEmpty()
+
//1.st resend
restSubId_resend := xappConn1.SendRESTSubsReq(t, params)
assert.Equal(t, restSubId_resend, restSubId)
- <-time.After(100 * time.Millisecond)
+ mainCtrl.WaitOngoingRequestMapEmpty()
//2.nd resend
restSubId_resend2 := xappConn1.SendRESTSubsReq(t, params)
assert.Equal(t, restSubId_resend2, restSubId)
- <-time.After(100 * time.Millisecond)
+ mainCtrl.WaitOngoingRequestMapEmpty()
deleteSubscription(t, xappConn1, e2termConn1, &restSubId)
queryXappSubscription(t, int64(e2SubsId), "RAN_NAME_1", []string{"localhost:13560"})
- <-time.After(100 * time.Millisecond)
+ mainCtrl.WaitOngoingRequestMapEmpty()
//1.st resend with subscription ID
params.SetSubscriptionID(&restSubId)
assert.Equal(t, restSubId_resend, restSubId)
- <-time.After(100 * time.Millisecond)
+ mainCtrl.WaitOngoingRequestMapEmpty()
//2.nd resend without subscription ID (faking app restart)
params = xappConn1.GetRESTSubsReqReportParams(subReqCount)
assert.Equal(t, restSubId_resend2, restSubId)
- <-time.After(100 * time.Millisecond)
+ mainCtrl.WaitOngoingRequestMapEmpty()
deleteSubscription(t, xappConn1, e2termConn1, &restSubId)
restSubId, e2SubsId := createSubscription(t, xappConn1, e2termConn1, params)
- <-time.After(100 * time.Millisecond)
+ mainCtrl.WaitOngoingRequestMapEmpty()
// Send modified requst, this time with e2 subscriptions.
params2 := xappConn1.GetRESTSubsReqReportParams(subReqCount + 1)
e2SubsId2 := xappConn1.WaitRESTNotification(t, restSubId_resend)
assert.NotEqual(t, e2SubsId2, 0)
- <-time.After(100 * time.Millisecond)
+ mainCtrl.WaitOngoingRequestMapEmpty()
xapp.Subscription.SetResponseCB(xappConn1.SubscriptionRespHandler)
params = xappConn1.GetRESTSubsReqReportParams(subReqCount)
e2SubsId1 = xappConn1.WaitAnyRESTNotification(t)
assert.Equal(t, e2SubsId, e2SubsId1)
+ mainCtrl.WaitOngoingRequestMapEmpty()
+
// Delete both e2 subscriptions
xappConn1.SendRESTSubsDelReq(t, &restSubId)
e2SubsIds := []uint32{e2SubsId, e2SubsId2}
restSubId, e2SubsId := createSubscription(t, xappConn1, e2termConn1, params)
- <-time.After(100 * time.Millisecond)
+ mainCtrl.WaitOngoingRequestMapEmpty()
// Send modified requst, this time with e2 subscriptions.
params2 := xappConn1.GetRESTSubsReqReportParams(subReqCount + 1)
e2SubsId2 := xappConn1.WaitRESTNotification(t, restSubId_resend)
assert.NotEqual(t, e2SubsId2, 0)
- <-time.After(100 * time.Millisecond)
+ mainCtrl.WaitOngoingRequestMapEmpty()
xapp.Subscription.SetResponseCB(xappConn1.SubscriptionRespHandler)
params = xappConn1.GetRESTSubsReqReportParams(subReqCount)
e2SubsId1 = xappConn1.WaitAnyRESTNotification(t)
assert.Equal(t, e2SubsId, e2SubsId1)
+ mainCtrl.WaitOngoingRequestMapEmpty()
+
// Delete both e2 subscriptions
xappConn1.SendRESTSubsDelReq(t, &restSubId)
e2SubsIds := []uint32{e2SubsId, e2SubsId2}
restSubId, e2SubsId := createSubscription(t, xappConn1, e2termConn1, params)
- <-time.After(100 * time.Millisecond)
+ mainCtrl.WaitOngoingRequestMapEmpty()
// Send modified requst, this time with e2 subscriptions.
params2 := xappConn1.GetRESTSubsReqReportParams(subReqCount + 1)
e2SubsId2 := xappConn1.WaitRESTNotification(t, restSubId_resend)
assert.NotEqual(t, e2SubsId2, 0)
- <-time.After(100 * time.Millisecond)
+ mainCtrl.WaitOngoingRequestMapEmpty()
// Delete both e2 subscriptions
xappConn1.SendRESTSubsDelReq(t, &restSubId)
// fresh create.
restSubId, e2SubsId = createSubscription(t, xappConn1, e2termConn1, params)
- <-time.After(100 * time.Millisecond)
+ mainCtrl.WaitOngoingRequestMapEmpty()
deleteSubscription(t, xappConn1, e2termConn1, &restSubId)