Skip to content

Commit f9a8375

Browse files
committed
fix stopping tests on jython (not windows)
1 parent a6677aa commit f9a8375

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

test/atest/stopping.robot

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ Stop Remote Server
99

1010
SIGINT
1111
Skip On Windows
12-
Send Signal To Process SIGINT
12+
Send Signal To Remote Server SIGINT
1313

1414
SIGHUP
1515
Skip On Windows
16-
Send Signal To Process SIGHUP
16+
Send Signal To Remote Server SIGHUP
1717

1818
SIGTERM
1919
Skip On Windows
20-
Send Signal To Process SIGTERM
20+
Send Signal To Remote Server SIGTERM
2121

2222
*** Keywords ***
2323
Start Server
@@ -36,3 +36,8 @@ Server Should Be Stopped
3636

3737
Skip On Windows
3838
Run Keyword If "${:}" == ";" Fail Skipped on Windows skip
39+
40+
Send Signal To Remote Server
41+
[Arguments] ${signal}
42+
${process pid}= Run Keyword ${TEST NAME}.get_pid
43+
Evaluate os.kill(${process pid}, signal.${signal}) os,signal

test/libs/basics.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
import os
2+
3+
14
class BasicCommunication(object):
25
"""Testing basic communication and keyword documentation."""
36

@@ -8,6 +11,12 @@ def passing(self):
811
"""
912
pass
1013

14+
def get_pid(self):
15+
"""
16+
Returns process id for the remote server that is serving this library.
17+
"""
18+
return os.getpid()
19+
1120
def failing(self, message):
1221
"""This keyword fails with provided `message`"""
1322
raise AssertionError(message)

0 commit comments

Comments
 (0)