Skip to content

Commit 751a4ec

Browse files
committed
multiprocessing bug in unittest-parallel
1 parent 0891abe commit 751a4ec

File tree

4 files changed

+20
-2
lines changed

4 files changed

+20
-2
lines changed

.github/workflows/javaTests.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ on:
2929
- '*.html'
3030
- 'src/main/python/**'
3131
- 'dev/**'
32+
- '.github/workflows/python.yml'
33+
- '.github/workflows/javaTests.yml'
3234
branches:
3335
- main
3436
pull_request:
@@ -38,6 +40,8 @@ on:
3840
- '*.html'
3941
- 'src/main/python/**'
4042
- 'dev/**'
43+
- '.github/workflows/python.yml'
44+
- '.github/workflows/javaTests.yml'
4145
branches:
4246
- main
4347

.github/workflows/python.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ on:
3030
- 'src/test/**'
3131
- 'src/assembly/**'
3232
- 'dev/**'
33+
- '.github/workflows/javaTests.yml'
3334
branches:
3435
- main
3536
pull_request:
@@ -39,6 +40,7 @@ on:
3940
- '*.html'
4041
- 'src/test/**'
4142
- 'dev/**'
43+
- '.github/workflows/javaTests.yml'
4244
branches:
4345
- main
4446

@@ -132,15 +134,27 @@ jobs:
132134
export SYSDS_QUIET=1
133135
export LOG4JPROP=$SYSTEMDS_ROOT/src/test/resources/log4j.properties
134136
cd src/main/python
137+
138+
# parallel tests
135139
unittest-parallel -t . -s tests -v
140+
141+
# non parallel tests
142+
python -m unittest tests.non_parallel_tests
143+
136144
# python -m unittest discover -s tests -p 'test_*.py'
137145
echo "Exit Status: " $?
138146
139147
- name: Run all python tests no environment
140148
run: |
141149
export LOG4JPROP=$(pwd)/src/test/resources/log4j.properties
142150
cd src/main/python
151+
152+
# parallel tests
143153
unittest-parallel -t . -s tests -v
154+
155+
# non parallel tests
156+
python -m unittest tests.non_parallel_tests
157+
144158
# python -m unittest discover -s tests -p 'test_*.py'
145159
echo "Exit Status: " $?
146160

src/main/python/systemds/context/systemds_context.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def __init__(
8787
capture_stdout: bool = False,
8888
logging_level: int = 20,
8989
py4j_logging_level: int = 50,
90-
data_transfer_mode: int = 1,
90+
data_transfer_mode: int = 0,
9191
multi_pipe_enabled: bool = False,
9292
):
9393
"""Starts a new instance of SystemDSContext, in which the connection to a JVM systemds instance is handled
@@ -120,7 +120,7 @@ def __setup_data_transfer(self, data_transfer_mode=0, multi_pipe_enabled=False):
120120
self.__make_fifo_named_pipes(num_pipes)
121121
executor_pool, in_pipes, out_pipes = self.__init_pipes(num_pipes)
122122

123-
self._log.debug("Handshake done for {} IN / OUT Pipes".format(num_pipes))
123+
self._log.info("Data transfer: Handshake done for {} IN / OUT Pipes".format(num_pipes))
124124
self.executor_pool = executor_pool
125125
self.FIFO_PY2JAVA_PIPES = out_pipes
126126
self.FIFO_JAVA2PY_PIPES = in_pipes

src/main/python/tests/matrix/test_block_converter_unix_pipe.py renamed to src/main/python/tests/non_parallel_tests/test_block_converter_unix_pipe.py

File renamed without changes.

0 commit comments

Comments
 (0)