diff options
author | Robert Wojciechowicz <robertx.wojciechowicz@intel.com> | 2015-09-29 08:21:22 -0400 |
---|---|---|
committer | Maryam Tahhan <maryam.tahhan@intel.com> | 2015-10-07 12:17:02 +0000 |
commit | 46e36fffc36753b0e8e3f79f78dc084f26930a82 (patch) | |
tree | a8771ae2ee1564ad45b845ae9f447c16ccfb0e66 /core | |
parent | ca57d8cb20398bdcc6a29b277504b70960e9f068 (diff) |
pkt_gen: change duration to int for Dummy pkt_gen
In case there is specified concrete value for "duration" in the
configuration there is raised TypeError exception
in the send_rfc2544_throughput function of dummy traffic generator.
Conversion to integer solved this issue.
Change-Id: Ib37ecabc1000369d807a997c88d7a3d7aca425d5
Signed-off-by: Robert Wojciechowicz <robertx.wojciechowicz@intel.com>
Reviewed-by: Dino Simeon Madarang <dino.simeonx.madarang@intel.com>
Reviewed-by: Martin Klozik <martinx.klozik@intel.com>
Reviewed-by: Maryam Tahhan <maryam.tahhan@intel.com>
Diffstat (limited to 'core')
-rw-r--r-- | core/traffic_controller_rfc2544.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/traffic_controller_rfc2544.py b/core/traffic_controller_rfc2544.py index e8f1e2a0..fa4a9c35 100644 --- a/core/traffic_controller_rfc2544.py +++ b/core/traffic_controller_rfc2544.py @@ -39,8 +39,8 @@ class TrafficControllerRFC2544(ITrafficController, IResults): self._traffic_gen_class = traffic_gen_class() self._traffic_started = False self._traffic_started_call_count = 0 - self._trials = get_test_param('rfc2544_trials', 1) - self._duration = get_test_param('duration', 30) + self._trials = int(get_test_param('rfc2544_trials', 1)) + self._duration = int(get_test_param('duration', 30)) self._results = [] # If set, comma separated packet_sizes value from --test_params @@ -94,14 +94,14 @@ class TrafficControllerRFC2544(ITrafficController, IResults): traffic['l2'] = {'framesize': packet_size} if traffic['traffic_type'] == 'back2back': result = self._traffic_gen_class.send_rfc2544_back2back( - traffic, trials=int(self._trials), + traffic, trials=self._trials, duration=self._duration) elif traffic['traffic_type'] == 'continuous': result = self._traffic_gen_class.send_cont_traffic( traffic, time=int(get_test_param('rfc2544_duration', 30))) else: result = self._traffic_gen_class.send_rfc2544_throughput( - traffic, trials=int(self._trials), + traffic, trials=self._trials, duration=self._duration) result = TrafficControllerRFC2544._append_results(result, @@ -118,7 +118,7 @@ class TrafficControllerRFC2544(ITrafficController, IResults): traffic['l2'] = {'framesize': packet_size} self._traffic_gen_class.start_rfc2544_throughput( traffic, - trials=int(self._trials), + trials=self._trials, duration=self._duration) self._traffic_started = True if len(function['args']) > 0: |