2 new revisions:
Revision: 92b847e020b9
Branch: default
Author: Jussi Malinen <[email protected]>
Date: Thu Nov 14 12:46:39 2013 UTC
Log: remove flickering faster than internal frequency timeout tests
from te...
http://code.google.com/p/robotframework/source/detail?r=92b847e020b9
Revision: d787ea507883
Branch: default
Author: Jussi Malinen <[email protected]>
Date: Thu Nov 14 12:46:47 2013 UTC
Log: Automated merge with https://code.google.com/p/robotframework
http://code.google.com/p/robotframework/source/detail?r=d787ea507883
==============================================================================
Revision: 92b847e020b9
Branch: default
Author: Jussi Malinen <[email protected]>
Date: Thu Nov 14 12:46:39 2013 UTC
Log: remove flickering faster than internal frequency timeout tests
from telnet. Also cleanup.
http://code.google.com/p/robotframework/source/detail?r=92b847e020b9
Modified:
/atest/robot/standard_libraries/telnet/terminal_emulation.txt
/atest/testdata/standard_libraries/telnet/terminal_emulation.txt
/src/robot/libraries/Telnet.py
=======================================
--- /atest/robot/standard_libraries/telnet/terminal_emulation.txt Fri Nov
8 12:47:29 2013 UTC
+++ /atest/robot/standard_libraries/telnet/terminal_emulation.txt Thu Nov
14 12:46:39 2013 UTC
@@ -30,15 +30,9 @@
Read Until Reads Using Internal Update Frequency
Check Test Case ${TEST NAME}
-
-Read Until With Timeout Faster Than Internal Frequency
- Check Test Case ${TEST NAME}
Read Until Regexp Using Internal Update Frequency
Check Test Case ${TEST NAME}
-
-Read Until Regexp With Timeout Faster Than Internal Frequency
- Check Test Case ${TEST NAME}
Override terminal emulation and type
Check Test Case ${TEST NAME}
=======================================
--- /atest/testdata/standard_libraries/telnet/terminal_emulation.txt Tue
Nov 12 12:05:02 2013 UTC
+++ /atest/testdata/standard_libraries/telnet/terminal_emulation.txt Thu
Nov 14 12:46:39 2013 UTC
@@ -62,21 +62,11 @@
Set timeout 2
Run with timeout 0.5 Read Until acdc
-Read Until With Timeout Faster Than Internal Frequency
- Write echo -e "abba\\x1b[3Dcdc"
- Set timeout 0.01
- Run with Timeout 0.05 Read Until acdc
-
Read Until Regexp Using Internal Update Frequency
Write echo -e "abba\\x1b[3Dcdc"
Set timeout 2
Run with timeout 0.5 Read Until Regexp acdc
-Read Until Regexp With Timeout Faster Than Internal Frequency
- Write echo -e "abba\\x1b[3Dcdc"
- Set timeout 0.01
- Run with Timeout 0.05 Read Until Regexp acdc
-
Window Size
[Setup] Login and set prompt terminal_emulation=True
window_size=1024x1024
Set Timeout 5
@@ -142,12 +132,6 @@
[Timeout] 0.5
${res}= Run keyword ${kw} @{args}
[Return] ${res}
-
-Run with timeout 0.05
- [Arguments] ${kw} @{args}
- [Timeout] 0.05
- ${res}= Run keyword ${kw} @{args}
- [Return] ${res}
Read until should match
[Arguments] ${expected} ${match}
=======================================
--- /src/robot/libraries/Telnet.py Tue Nov 12 12:07:53 2013 UTC
+++ /src/robot/libraries/Telnet.py Thu Nov 14 12:46:39 2013 UTC
@@ -453,6 +453,7 @@
NEW_ENVIRON_IS = chr(0)
NEW_ENVIRON_VAR = chr(0)
NEW_ENVIRON_VALUE = chr(1)
+ INTERNAL_UPDATE_FREQUENCY = 0.03
def __init__(self, host=None, port=23, timeout=3.0, newline='CRLF',
prompt=None, prompt_is_regexp=False,
@@ -812,14 +813,14 @@
@property
def _terminal_frequency(self):
- return min(0.03, self._timeout)
+ return min(self.INTERNAL_UPDATE_FREQUENCY, self._timeout)
def _terminal_read_until(self, expected):
- start_time = time.time()
+ max_time = time.time() + self._timeout
out = self._terminal_emulator.read_until(expected)
if out:
return True, out
- while(time.time() < start_time + self._timeout):
+ while time.time() < max_time:
input_bytes = telnetlib.Telnet.read_until(self, expected,
self._terminal_frequency)
self._terminal_emulator.feed(input_bytes)
@@ -838,13 +839,12 @@
def _terminal_read_until_regexp(self, expected_list):
- start_time = time.time()
+ max_time = time.time() + self._timeout
regexp_list = [re.compile(rgx) for rgx in expected_list]
out = self._terminal_emulator.read_until_regexp(regexp_list)
if out:
return True, out
-
- while(time.time() < start_time + self._timeout):
+ while time.time() < max_time:
_index, _, output = self.expect(regexp_list,
self._terminal_frequency)
self._terminal_emulator.feed(output)
out = self._terminal_emulator.read_until_regexp(regexp_list)
==============================================================================
Revision: d787ea507883
Branch: default
Author: Jussi Malinen <[email protected]>
Date: Thu Nov 14 12:46:47 2013 UTC
Log: Automated merge with https://code.google.com/p/robotframework
http://code.google.com/p/robotframework/source/detail?r=d787ea507883
--
---
You received this message because you are subscribed to the Google Groups "robotframework-commit" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.