Skip to content

Commit 1c327a7

Browse files
committed
add ci of plasma java client
1 parent 14393f5 commit 1c327a7

File tree

4 files changed

+50
-6
lines changed

4 files changed

+50
-6
lines changed

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ matrix:
130130
env: ARROW_TEST_GROUP=integration
131131
jdk: openjdk8
132132
env:
133+
- ARROW_TRAVIS_PLASMA=1
134+
- ARROW_TRAVIS_PLASMA_JAVA_CLIENT=1
133135
- CC="clang-6.0"
134136
- CXX="clang++-6.0"
135137
before_script:
@@ -141,6 +143,7 @@ matrix:
141143
- $TRAVIS_BUILD_DIR/ci/travis_before_script_cpp.sh
142144
script:
143145
- $TRAVIS_BUILD_DIR/ci/travis_script_integration.sh
146+
- $TRAVIS_BUILD_DIR/ci/travis_script_plasma_java_client.sh
144147
# NodeJS
145148
- language: node_js
146149
os: linux

ci/travis_before_script_cpp.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ if [ $ARROW_TRAVIS_PLASMA == "1" ]; then
7474
CMAKE_COMMON_FLAGS="$CMAKE_COMMON_FLAGS -DARROW_PLASMA=ON"
7575
fi
7676

77+
if [ $ARROW_TRAVIS_PLASMA_JAVA_CLIENT == "1" ]; then
78+
CMAKE_COMMON_FLAGS="$CMAKE_COMMON_FLAGS -DARROW_PLASMA_JAVA_CLIENT=ON"
79+
fi
80+
7781
if [ $ARROW_TRAVIS_ORC == "1" ]; then
7882
CMAKE_COMMON_FLAGS="$CMAKE_COMMON_FLAGS -DARROW_ORC=ON"
7983
fi
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/usr/bin/env bash
2+
3+
# Licensed to the Apache Software Foundation (ASF) under one
4+
# or more contributor license agreements. See the NOTICE file
5+
# distributed with this work for additional information
6+
# regarding copyright ownership. The ASF licenses this file
7+
# to you under the Apache License, Version 2.0 (the
8+
# "License"); you may not use this file except in compliance
9+
# with the License. You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing,
14+
# software distributed under the License is distributed on an
15+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
# KIND, either express or implied. See the License for the
17+
# specific language governing permissions and limitations
18+
# under the License.
19+
20+
set -e
21+
22+
PLASMA_JAVA_DIR=${TRAVIS_BUILD_DIR}/java/plasma
23+
24+
pushd $PLASMA_JAVA_DIR
25+
26+
mvn clean install
27+
export PLASMA_STORE=${TRAVIS_BUILD_DIR}/cpp-install/bin/plasma_store
28+
java -cp target/test-classes:target/classes -Djava.library.path=${TRAVIS_BUILD_DIR}/cpp-build/debug/ org.apache.arrow.plasma.PlasmaClientTest
29+
30+
popd

java/plasma/src/test/java/org/apache/arrow/plasma/PlasmaClientTest.java

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,21 @@ public class PlasmaClientTest {
3535

3636

3737
public PlasmaClientTest() throws Exception{
38-
String plasmaStorePath = System.getenv("PLASMA_STORE");
39-
if(plasmaStorePath == null) {
40-
throw new Exception("Please set plasma store path in env PLASMA_STORE");
38+
try {
39+
String plasmaStorePath = System.getenv("PLASMA_STORE");
40+
if(plasmaStorePath == null) {
41+
throw new Exception("Please set plasma store path in env PLASMA_STORE");
42+
}
43+
44+
this.startObjectStore(plasmaStorePath);
45+
System.loadLibrary("plasma_java");
46+
pLink = new PlasmaClient(this.getStoreAddress(), "", 0);
47+
}
48+
catch (Throwable t) {
49+
cleanup();
50+
throw t;
4151
}
4252

43-
this.startObjectStore(plasmaStorePath);
44-
System.loadLibrary("plasma_java");
45-
pLink = new PlasmaClient(this.getStoreAddress(), "", 0);
4653
}
4754

4855
private Process startProcess(String[] cmd) {

0 commit comments

Comments
 (0)