Code Review
/
ric-plt
/
submgr.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
RICPLT-3008 Subscription register free id list
[ric-plt/submgr.git]
/
pkg
/
control
/
messaging_test.go
diff --git
a/pkg/control/messaging_test.go
b/pkg/control/messaging_test.go
index
1b50c8b
..
ed31423
100644
(file)
--- a/
pkg/control/messaging_test.go
+++ b/
pkg/control/messaging_test.go
@@
-548,24
+548,24
@@
func (mc *testingMainControl) wait_subs_trans_clean(t *testing.T, e2SubsId int,
return false
}
return false
}
-func (mc *testingMainControl) get_s
eqcnt
(t *testing.T) uint16 {
+func (mc *testingMainControl) get_s
ubid
(t *testing.T) uint16 {
mc.c.registry.mutex.Lock()
defer mc.c.registry.mutex.Unlock()
mc.c.registry.mutex.Lock()
defer mc.c.registry.mutex.Unlock()
- return mc.c.registry.
counter
+ return mc.c.registry.
subIds[0]
}
}
-func (mc *testingMainControl) wait_s
eqcnt_change(t *testing.T, orig
uint16, secs int) (uint16, bool) {
+func (mc *testingMainControl) wait_s
ubid_change(t *testing.T, origSubId
uint16, secs int) (uint16, bool) {
i := 1
for ; i <= secs*2; i++ {
mc.c.registry.mutex.Lock()
i := 1
for ; i <= secs*2; i++ {
mc.c.registry.mutex.Lock()
- curr
:= mc.c.registry.counter
+ curr
SubId := mc.c.registry.subIds[0]
mc.c.registry.mutex.Unlock()
mc.c.registry.mutex.Unlock()
- if curr
!= orig
{
- return curr, true
+ if curr
SubId != origSubId
{
+ return curr
SubId
, true
}
time.Sleep(500 * time.Millisecond)
}
}
time.Sleep(500 * time.Millisecond)
}
- testError(t, "(general) no s
eq
change within %d secs", secs)
+ testError(t, "(general) no s
ubId
change within %d secs", secs)
return 0, false
}
return 0, false
}
@@
-1306,5
+1306,3
@@
func TestSubDelReqSubDelFailRespInSubmgr(t *testing.T) {
// Wait that subs is cleaned
mainCtrl.wait_subs_clean(t, e2SubsId, 10)
}
// Wait that subs is cleaned
mainCtrl.wait_subs_clean(t, e2SubsId, 10)
}
-
-/* */