test: Add a manual test for the delayed rf channel release ack
This commit is contained in:
parent
c5fae333f8
commit
bdb064746c
|
@ -30,6 +30,23 @@ FakeBTS.BTS subclass: DelayedAckBTS [
|
|||
super sendRSLActivationAck: aMsg on: aTrx.
|
||||
]
|
||||
]
|
||||
|
||||
]
|
||||
|
||||
FakeBTS.BTS subclass: DelayedReleaseAckBTS [
|
||||
<comment: 'I will delay RSLRFChannelReleaseAck messages causing the channels
|
||||
to be marked as broken in the BSC/NITB or at least that is the plan.'>
|
||||
|
||||
sendOnPrimaryRSL: aMsg [
|
||||
| rsl |
|
||||
"We need to decode the message and check if it is a ChannelReleaseACK
|
||||
and we will delay it then..."
|
||||
rsl := RSLMessageBase parse: aMsg readStream.
|
||||
rsl class = FakeBTS.RSLRFChannelReleaseAck
|
||||
ifTrue: [Osmo.TimerScheduler instance scheduleInSeconds: 6 block:
|
||||
[super sendOnPrimaryRSL: aMsg]]
|
||||
ifFalse: [super sendOnPrimaryRSL: aMsg].
|
||||
]
|
||||
]
|
||||
|
||||
FakeBTS.OpenBSCTest subclass: DelayedAckTest [
|
||||
|
@ -67,7 +84,27 @@ FakeBTS.OpenBSCTest subclass: DelayedAckTest [
|
|||
lchan := self requireAnyChannel.
|
||||
self assert: lchan isNil message: 'Channel assignment should fail'.
|
||||
|
||||
Transcript nextPutAll: 'Waiting for new line.. press any key to quit'.
|
||||
Transcript nextPutAll: 'Waiting for new line.. press to continue'.
|
||||
stdin next.
|
||||
]
|
||||
]
|
||||
|
||||
FakeBTS.OpenBSCTest subclass: DelayedReleaseAckTest [
|
||||
<import: OsmoGSM>
|
||||
|
||||
createBTS [
|
||||
^DelayedReleaseAckBTS new
|
||||
]
|
||||
|
||||
startTest [
|
||||
| lchan |
|
||||
|
||||
self createAndConnectBTS: '1801/0/0'.
|
||||
|
||||
lchan := self requireAnyChannel.
|
||||
self deny: lchan isNil message: 'Channel assignment should work'.
|
||||
|
||||
Transcript nextPutAll: 'Waiting for new line.. press to quit'.
|
||||
stdin next.
|
||||
]
|
||||
]
|
||||
|
@ -75,4 +112,6 @@ FakeBTS.OpenBSCTest subclass: DelayedAckTest [
|
|||
Eval [
|
||||
DelayedAckTest new
|
||||
startTest.
|
||||
DelayedReleaseAckTest new
|
||||
startTest.
|
||||
]
|
||||
|
|
Reference in New Issue