summaryrefslogtreecommitdiff
path: root/cesar
diff options
context:
space:
mode:
authorNélio Laranjeiro2011-12-01 17:40:45 +0100
committerNélio Laranjeiro2011-12-20 16:44:59 +0100
commit6f31da506ff273ed4a785a693d2ae65fddefc546 (patch)
tree02e5f17f8dfdb8c0a11959ef9858ac9822b58eed /cesar
parent6761d3292d1a3b8aa2089fcc264ce18575529ade (diff)
cesar/test_general/station/scenario: data rate is not testable, refs #2849
Maximus is too slow to test a data rate.
Diffstat (limited to 'cesar')
-rw-r--r--cesar/test_general/station/scenario/py/sc13_data_rate.py71
1 files changed, 0 insertions, 71 deletions
diff --git a/cesar/test_general/station/scenario/py/sc13_data_rate.py b/cesar/test_general/station/scenario/py/sc13_data_rate.py
deleted file mode 100644
index da24f8722c..0000000000
--- a/cesar/test_general/station/scenario/py/sc13_data_rate.py
+++ /dev/null
@@ -1,71 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-# Copyright (C) 2011 Spidcom
-#############################################################################
-
-import sys
-sys.path.append ('py')
-from scenario_init import *
-
-class TestDataRate (unittest.TestCase):
- """Create an avln and check data_rate evolution with cm_nw_stats."""
-
- def setUp (self):
- self.csi = csiCore (1234)
- self.csi.process_init (args)
- self.csi.init_test_bed ([2])
-
- def tearDown (self):
- self.csi.uninit_test_bed ()
- self.csi.process_uninit ()
- del self.csi
-
- def cm_nw_stats (self, sta):
- """Send a CM_NW_STATS to the station and wait for the response."""
- cm_nw_stats_req = \
- Ether (dst = sta.get_mac_addr (), src = MAC_DEFAULT) \
- / scammer.MME () \
- / scammer.CM_NW_STATS_REQ ()
- return sendnrecv_mme (self.csi.get_maximus (), sta, cm_nw_stats_req)
-
- def testDataRate (self):
- """Test the data rate evolution between two authenticated stations.
-
- Expected results: the data rate has evolved.
- """
- avln = self.csi.avln_get (0)
- sta1 = avln.get_sta (0)
- sta2 = avln.get_sta (1)
- # Macs.
- sta1_mac = sta1.get_mac_addr ()
- sta2_mac = sta2.get_mac_addr ()
- # Create the MME
- rsp = self.cm_nw_stats (sta1)
- self.failUnless (rsp)
- cm_nw_stats_cnf = Ether (rsp[0].get ())
- # No data rate evolution at this point.
- rsp = self.cm_nw_stats (sta1)
- self.failUnless (rsp)
- cm_nw_stats_cnf2 = Ether (rsp[0].get ())
- self.failUnless (cm_nw_stats_cnf == cm_nw_stats_cnf2)
- del cm_nw_stats_cnf2
- # Send data from station 1 to station 2.
- packets = list ()
- packets.append (csiPacket (payload_size = 200, avln = avln,
- sta_src = sta2, sta_dest = sta1))
- packets.append (csiPacket (payload_size = 200, avln = avln,
- sta_src = sta1, sta_dest = sta2))
- transmit = send_check_datas (self.csi, avln, packets)
- self.failUnless (transmit)
- # Data rate should evolved.
- rsp = self.cm_nw_stats (sta1)
- self.failUnless (rsp)
- cm_nw_stats_cnf2 = Ether (rsp[0].get ())
- self.failUnless (cm_nw_stats_cnf != cm_nw_stats_cnf2)
- del cm_nw_stats_cnf2
-
-if __name__ == '__main__':
- suite = unittest.TestLoader().loadTestsFromTestCase(TestDataRate)
- testResult = unittest.TextTestRunner(verbosity=2).run(suite)
- sys.exit ((1, 0)[testResult.wasSuccessful ()])