Skip to content

Commit ab865fa

Browse files
committed
Fix PythonApiTests Jenkins failure by using portable worker path configuration (Fixes #642)
1 parent e01acfa commit ab865fa

2 files changed

Lines changed: 7 additions & 11 deletions

File tree

wayang-api/wayang-api-python/src/test/java/org/apache/wayang/api/python/PythonApiTests.java

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,15 @@ class PythonApiTests {
3131
@Test
3232
void processCallerSocketTest() {
3333
try {
34-
final Configuration configuration = new Configuration();
35-
final String path = Paths.get("python/worker.py").toString();
36-
37-
configuration.setProperty("wayang.api.python.worker", path);
34+
final Configuration configuration = new Configuration();
35+
final PythonProcessCaller processCaller = new PythonProcessCaller();
3836

39-
final PythonProcessCaller processCaller = new PythonProcessCaller();
37+
assertTrue(processCaller.getSocket().isConnected());
38+
assertTrue(processCaller.isReady());
4039

41-
assertTrue(processCaller.getSocket().isConnected());
42-
assertTrue(processCaller.isReady());
43-
44-
processCaller.close();
40+
processCaller.close();
4541
} catch (Exception e) {
4642
assumeTrue(false, "Skipping test due to setup error: " + e.getMessage());
4743
}
4844
}
49-
}
45+
}

wayang-api/wayang-api-python/src/test/resources/wayang.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616
#
17-
wayang.api.python.worker = /var/www/html/python/src/pywy/execution/worker.py
17+
wayang.api.python.worker = ../../python/src/pywy/execution/worker.py
1818
wayang.api.python.path = python3
1919
wayang.api.python.env.path = /var/www/html/python/src
2020

0 commit comments

Comments
 (0)