1
0
Fork 0

test: Add a manual test for the delayed rf channel release ack

This commit is contained in:
Holger Hans Peter Freyther 2013-05-02 19:31:55 +02:00
parent c5fae333f8
commit bdb064746c
1 changed files with 40 additions and 1 deletions

View File

@ -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.
]