Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DO NOT MERGE] DAOS-4093 test: java package and Java IT test. #4410

Draft
wants to merge 110 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
110 commits
Select commit Hold shift + click to select a range
9d1e205
DAOS-4093 test: Integrate Java and Hadoop test into DAOS CI
Puspalogan Aug 20, 2020
c8c377d
DAOS-3794 test: Add pool destroy test during rebuild with io
saurabhtandan Oct 20, 2020
42bca9c
Merge branch 'master' into DAOS-3794
saurabhtandan Oct 20, 2020
a7a9ce0
Merge branch 'master' into DAOS-4093
saurabhtandan Oct 27, 2020
01e1478
Merge branch 'master' into DAOS-4093
saurabhtandan Nov 3, 2020
8e0ae37
Merge branch 'master' into DAOS-4093
saurabhtandan Nov 3, 2020
5cb6795
Added maven package to rpms list
saurabhtandan Nov 3, 2020
873b941
Merge branch 'DAOS-4093' of github.com:daos-stack/daos into DAOS-4093
saurabhtandan Nov 3, 2020
a545001
Increased timeout limit.
saurabhtandan Nov 4, 2020
e31ba7e
Merge branch 'master' into DAOS-4093
saurabhtandan Nov 5, 2020
362a9c8
Automated java sdk version
saurabhtandan Nov 6, 2020
f7b7f25
Running maven with extra log display.
saurabhtandan Nov 6, 2020
a01dd41
Build Java jar files during setup
saurabhtandan Nov 6, 2020
250d18d
Moved java build as part of SCons script.
saurabhtandan Nov 10, 2020
a45e0f5
Merge branch 'master' of github.com:daos-stack/daos
saurabhtandan Nov 23, 2020
df3701d
Merge branch 'master' of github.com:daos-stack/daos
saurabhtandan Nov 30, 2020
23b7c96
Merge branch 'master' of github.com:daos-stack/daos
saurabhtandan Dec 2, 2020
4b41ac9
Merge branch 'master' of github.com:daos-stack/daos
saurabhtandan Dec 3, 2020
3c67b00
Merge branch 'master' of github.com:daos-stack/daos
saurabhtandan Dec 3, 2020
160d4e9
Merge branch 'master' of github.com:daos-stack/daos
saurabhtandan Dec 7, 2020
0ce8126
Merge branch 'master' of github.com:daos-stack/daos
saurabhtandan Dec 14, 2020
27d81c0
Merge branch 'master' of github.com:daos-stack/daos
saurabhtandan Dec 18, 2020
fa09ae6
Merge branch 'master' of github.com:daos-stack/daos
saurabhtandan Jan 5, 2021
4a6ecc1
Merge branch 'master' of github.com:daos-stack/daos
saurabhtandan Jan 8, 2021
eb68fa9
Merge branch 'master' of github.com:daos-stack/daos
saurabhtandan Jan 12, 2021
4e341ee
Merge branch 'master' of github.com:daos-stack/daos
saurabhtandan Jan 15, 2021
0deed20
Merge branch 'master' of github.com:daos-stack/daos
saurabhtandan Jan 19, 2021
a1c6d22
Merge branch 'master' of github.com:daos-stack/daos
saurabhtandan Jan 21, 2021
a5ea44d
Merge branch 'master' of github.com:daos-stack/daos
saurabhtandan Jan 22, 2021
9cad4e9
Merge branch 'master' of github.com:daos-stack/daos
saurabhtandan Jan 25, 2021
ddf7710
Modified daos.spec and JenkinsFile to add daos-tests-java
saurabhtandan Jan 25, 2021
801b0d4
Merge branch 'DAOS-4093' into DAOS-4093_java_package
saurabhtandan Jan 25, 2021
aa19356
[DO NOT MERGE] DAOS-4093 test: java package and Java IT test.
saurabhtandan Jan 25, 2021
aa01dfa
Removing unwanted files
saurabhtandan Jan 25, 2021
05ba7e1
Modified daos.spec as per suggestions
saurabhtandan Jan 26, 2021
f112e37
Modified daos.spec
saurabhtandan Jan 26, 2021
ee9a86d
Modified JenkinsFile
saurabhtandan Jan 26, 2021
55c31a2
Modified daos.spec
saurabhtandan Jan 26, 2021
a36c9e6
Modified daos.spec
saurabhtandan Jan 27, 2021
946d74b
Merge branch 'master' of github.com:daos-stack/daos
saurabhtandan Jan 27, 2021
e97c2cc
Modified daos.spec
saurabhtandan Jan 27, 2021
1008d2a
Merge branch 'master' into DAOS-4093_java_package
saurabhtandan Jan 27, 2021
fdd7955
Modified ci_integration.py file
saurabhtandan Jan 28, 2021
ec6bf25
Merge branch 'master' of github.com:daos-stack/daos
saurabhtandan Jan 28, 2021
7b6f423
Modified test files
saurabhtandan Jan 29, 2021
1f079cc
Modified test file
saurabhtandan Jan 29, 2021
121aa97
Merge branch 'master' of github.com:daos-stack/daos
saurabhtandan Jan 29, 2021
eeb7797
Merge branch 'master' of github.com:daos-stack/daos
saurabhtandan Feb 1, 2021
a85560e
Merge branch 'master' into DAOS-4093_java_package
saurabhtandan Feb 2, 2021
6b42ea3
Using find_java_home.sh
saurabhtandan Feb 2, 2021
5ae9ec0
Changed test file
saurabhtandan Feb 3, 2021
92c7485
Modified test file
saurabhtandan Feb 3, 2021
f1eca1e
Modified test file
saurabhtandan Feb 3, 2021
4b24f15
Modified test file
saurabhtandan Feb 3, 2021
1ecf038
Merge branch 'master' of github.com:daos-stack/daos
saurabhtandan Feb 3, 2021
1775178
Merge branch 'master' of github.com:daos-stack/daos
saurabhtandan Feb 4, 2021
9d9f688
Merge branch 'master' of github.com:daos-stack/daos
saurabhtandan Feb 5, 2021
8470f2b
Merge branch 'master' of github.com:daos-stack/daos
saurabhtandan Feb 6, 2021
ceab242
Merge branch 'master' of github.com:daos-stack/daos
saurabhtandan Feb 8, 2021
67796bf
Merge branch 'master' of github.com:daos-stack/daos
saurabhtandan Feb 9, 2021
d1102f0
Merge branch 'master' into DAOS-4093_java_package
saurabhtandan Feb 10, 2021
0797ea1
Merge branch 'master' of github.com:daos-stack/daos
saurabhtandan Feb 10, 2021
6f2e147
Merge branch 'master' into DAOS-4093_java_package
saurabhtandan Feb 10, 2021
121f393
WIP
saurabhtandan Feb 11, 2021
ad9872d
Merge branch 'master' of github.com:daos-stack/daos
saurabhtandan Feb 11, 2021
f02c1d8
Merge branch 'master' into DAOS-4093_java_package
saurabhtandan Feb 11, 2021
4dedb4e
Corrected daos.spec chronology
saurabhtandan Feb 11, 2021
95afe4f
Quick-Functional: true
saurabhtandan Feb 12, 2021
c7ff7f1
Quick-Functional: true
saurabhtandan Feb 12, 2021
cd67606
Merge branch 'master' of github.com:daos-stack/daos
saurabhtandan Feb 16, 2021
292f44b
Merge branch 'master' into DAOS-4093_java_package
saurabhtandan Feb 16, 2021
070cb5f
Added java SConscript to build java.
saurabhtandan Feb 17, 2021
30273d1
Test-tag: javaciintegration
saurabhtandan Feb 17, 2021
de61293
Test-tag: javaciintegration
saurabhtandan Feb 17, 2021
b886b25
Test-tag: javaciintegration
saurabhtandan Feb 17, 2021
2c633e2
Merge branch 'master' of github.com:daos-stack/daos
saurabhtandan Feb 17, 2021
4f92541
Merge branch 'master' into DAOS-4093_java_package
saurabhtandan Feb 17, 2021
45ac04c
WIP
saurabhtandan Mar 9, 2021
a59ffe1
Merge branch 'master' of github.com:daos-stack/daos
saurabhtandan Mar 9, 2021
b34d6e2
Merge branch 'master' into DAOS-4093_java_package
saurabhtandan Mar 9, 2021
c24b7b9
Added provision for java code to build with in tree libs/headers
saurabhtandan Mar 9, 2021
b8a5c0c
Changed date in daos.spec changelog
saurabhtandan Mar 9, 2021
b8a67b1
Modified daos.spec
saurabhtandan Mar 9, 2021
011a5eb
Printing maven output in build.log
saurabhtandan Mar 9, 2021
dcdb12e
Test-tag: javaciintegration
saurabhtandan Mar 9, 2021
4862dc3
Enabled network for rpm packaging stage.
saurabhtandan Mar 10, 2021
df41832
Enabled network for rpm packaging stage.
saurabhtandan Mar 10, 2021
1e7a34b
Changed daos install path location in daos.spec
saurabhtandan Mar 10, 2021
372b426
Added hack to remove temporary part of the
saurabhtandan Mar 12, 2021
473b69e
Changed permission of java folder
saurabhtandan Mar 12, 2021
209de84
Modified daos.spec
saurabhtandan Mar 12, 2021
e519388
Modified test file.
saurabhtandan Mar 16, 2021
095965d
Modified test file.
saurabhtandan Mar 17, 2021
816706e
Modified JenkinsFile to add protobuf-c-devel
saurabhtandan Mar 18, 2021
06a09fe
Edited pom.xml
saurabhtandan Mar 19, 2021
8ff5bd3
Merge branch 'master' of github.com:daos-stack/daos
saurabhtandan Mar 19, 2021
aa4574e
Merge branch 'master' into DAOS-4093_java_package
saurabhtandan Mar 19, 2021
f348740
Modified test script after some conflicts due to master merging.
saurabhtandan Mar 19, 2021
cdf7f3d
Modified daos.spec
saurabhtandan Mar 19, 2021
fb17d43
Modified daos.spec
saurabhtandan Mar 20, 2021
439827f
Modified JenkinsFile
saurabhtandan Mar 22, 2021
2448c91
Merge branch 'master' of github.com:daos-stack/daos
saurabhtandan Apr 14, 2021
32682e1
Merge branch 'master' into DAOS-4093_java_package
saurabhtandan Apr 14, 2021
0490413
Modified daos.spec,find_build_paths.sh and pom.xml
saurabhtandan Apr 14, 2021
44bb7e8
Modified scan_daos_node.sh
saurabhtandan Apr 14, 2021
17aac2b
Pointed modified pipeline-lib branch with java package in JenkinsFile
saurabhtandan Apr 15, 2021
e949b1b
Restructured test files.
saurabhtandan Apr 15, 2021
0d5d55b
Modified yaml file as unwanted code got pushed.
saurabhtandan Apr 15, 2021
a837d9f
Merge branch 'master' of github.com:daos-stack/daos
saurabhtandan Apr 24, 2021
ebfe0d6
Merge branch 'master' into DAOS-4093_java_package
saurabhtandan Apr 24, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

// To use a test branch (i.e. PR) until it lands to master
// I.e. for testing library changes
//@Library(value="pipeline-lib@your_branch") _
@Library(value="pipeline-lib@java_package") _

// For master, this is just some wildly high number
next_version = "1000"
Expand Down
4 changes: 3 additions & 1 deletion ci/functional/required_packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ pkgs="openmpi3 hwloc ndctl fio \
hdf5-vol-daos-openmpi3-tests \
MACSio-mpich \
MACSio-openmpi3 \
mpifileutils-mpich-daos-${client_ver}"
mpifileutils-mpich-daos-${client_ver} \
protobuf-c \
protobuf-c-devel"

if [[ $distro = el7* ]] || [[ $distro = centos7* ]]; then
pkgs="--exclude openmpi $pkgs"
Expand Down
2 changes: 1 addition & 1 deletion ci/rpm/scan_daos_node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -uex

sudo yum -y install \
daos{,-{client,server,tests,debuginfo,devel}}-"${DAOS_PKG_VERSION}"
daos{,-{client,server,tests,debuginfo,devel,tests-java}}-"${DAOS_PKG_VERSION}"

lmd_src="maldet-current"
lmd_tarball="maldetect-current.tar.gz"
Expand Down
7 changes: 4 additions & 3 deletions src/client/java/daos-java/find_build_paths.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@

daos_install_path=$1
var=$2
build_vars=../../../../.build_vars.sh
in_tree=$3
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(lint) in_tree appears unused. Verify use (or export if used externally). [SC2034]

build_vars=../../../../.build_vars_.sh
if [ ! -f "${build_vars}" ]
then
if [ "$var" = "SL_PREFIX" ]
then
echo "${daos_install_path}"
echo "${daos_install_path}"
else # SL_PROTOBUFC_PREFIX, default to release
echo "${daos_install_path}/prereq/release/protobufc/"
echo "${daos_install_path}/prereq/release/protobufc/"
fi
else
source "${build_vars}"
Expand Down
Empty file modified src/client/java/daos-java/find_java_home.sh
100644 → 100755
Empty file.
94 changes: 79 additions & 15 deletions src/client/java/daos-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>

<parent>
Expand All @@ -18,6 +19,7 @@
<native.build.path>${project.basedir}/build</native.build.path>
<daos.install.path>${project.basedir}/install</daos.install.path>
<compile.proto>false</compile.proto>
<in-tree>false</in-tree>
</properties>

<dependencies>
Expand Down Expand Up @@ -98,12 +100,18 @@
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<version>3.0.0</version>
<executions>
<execution>
<id>compile-proto</id>
<phase>generate-sources</phase>
<configuration>
<taskdef resource="net/sf/antcontrib/antlib.xml"
uri="antlib:net.sf.antcontrib">
<classpath>
<fileset dir="${project.basedir}/ant.lib/ant-contrib"/>
</classpath>
</taskdef>
<target name="compile-proto" if="${compile.proto}">
<mkdir dir="${native.build.path}"/>
<exec dir="${native.build.path}"
Expand Down Expand Up @@ -132,24 +140,47 @@
<id>build-so</id>
<phase>compile</phase>
<configuration>
<tasks>
<target>
<mkdir dir="${native.build.path}"/>
<exec executable="sh" outputproperty="java-home" failonerror="true">
<arg value="./find_java_home.sh"/>
</exec>
<echo message="Java home is ${java-home}" />
<exec executable="bash" outputproperty="sl-prefix" failonerror="true">
<arg value="./find_build_paths.sh"/>
<arg value="${daos.install.path}"/>
<arg value="SL_PREFIX"/>
</exec>
<echo message="SL_PREFIX is ${sl-prefix}" />
<exec executable="bash" outputproperty="sl-protobufc-prefix" failonerror="true">
<arg value="./find_build_paths.sh"/>
<arg value="${daos.install.path}"/>
<arg value="SL_PROTOBUFC_PREFIX"/>
</exec>
<echo message="SL_PROTOBUFC_PREFIX is ${sl-protobufc-prefix}" />
<ac:if xmlns:ac="antlib:net.sf.antcontrib">
<ac:equals arg1="${in-tree}" arg2="true"/>
<ac:then>
<exec executable="bash" outputproperty="daos-build-dir" failonerror="true">
<arg value="./find_build_paths.sh"/>
<arg value="${daos.install.path}"/>
<arg value="SL_PREFIX"/>
<arg value="${in-tree}"/>
</exec>
<echo message="Daos Build Dir is ${daos-build-dir}" />
<exec executable="bash" outputproperty="protobufc-build-dir" failonerror="true">
<arg value="./find_build_paths.sh"/>
<arg value="${daos.install.path}"/>
<arg value="SL_PROTOBUFC_PREFIX"/>
<arg value="${in-tree}"/>
</exec>
<echo message="Protobufc Build Dir is ${protobufc-build-dir}" />
</ac:then>
<ac:else>
<exec executable="bash" outputproperty="sl-prefix" failonerror="true">
<arg value="./find_build_paths.sh"/>
<arg value="${daos.install.path}"/>
<arg value="SL_PREFIX"/>
<arg value="${in-tree}"/>
</exec>
<echo message="SL_PREFIX is ${sl-prefix}" />
<exec executable="bash" outputproperty="sl-protobufc-prefix" failonerror="true">
<arg value="./find_build_paths.sh"/>
<arg value="${daos.install.path}"/>
<arg value="SL_PROTOBUFC_PREFIX"/>
<arg value="${in-tree}"/>
</exec>
<echo message="SL_PROTOBUFC_PREFIX is ${sl-protobufc-prefix}" />
</ac:else>
</ac:if>
<delete file="${project.basedir}/src/main/native/include/io_daos_dfs_DaosFsClient_DaosFsClientBuilder.h"/>
<delete file="${project.basedir}/src/main/native/include/io_daos_DaosClient_DaosClientBuilder.h"/>
<delete file="${project.basedir}/src/main/native/include/io_daos_obj_DaosObjClient_DaosObjClientBuilder.h"/>
Expand All @@ -161,6 +192,7 @@
<arg value="-I${java-home}/include/"/>
<arg value="-I${java-home}/include/linux/"/>
<arg value="-I${daos.install.path}/include/"/>
<arg value="-I${daos.install.path}/../build/dev/gcc/src/include/"/>
<arg value="-I${project.basedir}/src/main/native/include/"/>
<arg value="${project.basedir}/src/main/native/daos_jni_common.c"/>
<arg value="-o${native.build.path}/daos_jni_common.o"/>
Expand All @@ -173,9 +205,11 @@
executable="gcc">
<arg value="-v"/>
<arg value="-I/usr/local/"/>
<arg value="-I/usr/include/"/>
<arg value="-I${java-home}/include/"/>
<arg value="-I${java-home}/include/linux/"/>
<arg value="-I${daos.install.path}/include/"/>
<arg value="-I${daos.install.path}/../build/dev/gcc/src/include/"/>
<arg value="-I${project.basedir}/src/main/native/include/"/>
<arg value="${project.basedir}/src/main/native/io_daos_DaosClient.c"/>
<arg value="-o${native.build.path}/io_daos_DaosClient.o"/>
Expand All @@ -188,10 +222,13 @@
executable="gcc">
<arg value="-v"/>
<arg value="-I/usr/local/"/>
<arg value="-I/usr/include/"/>
<arg value="-I${java-home}/include/"/>
<arg value="-I${java-home}/include/linux/"/>
<arg value="-I${sl-prefix}/include/"/>
<arg value="-I${sl-protobufc-prefix}/include/"/>
<arg value="-I${daos-build-dir}/include"/>
<arg value="-I${protobufc-build-dir}"/>
<arg value="-I${project.basedir}/src/main/native/include/"/>
<arg value="${project.basedir}/src/main/native/io_daos_obj_DaosObjClient.c"/>
<arg value="-o${native.build.path}/io_daos_obj_DaosObjClient.o"/>
Expand All @@ -204,8 +241,11 @@
executable="gcc">
<arg value="-v"/>
<arg value="-I/usr/local/"/>
<arg value="-I/usr/include/"/>
<arg value="-I${java-home}/include/"/>
<arg value="-I${java-home}/include/linux/"/>
<arg value="-I${daos-build-dir}/include"/>
<arg value="-I${protobufc-build-dir}"/>
<arg value="-I${sl-prefix}/include/"/>
<arg value="-I${sl-protobufc-prefix}/include/"/>
<arg value="-I${project.basedir}/src/main/native/include/"/>
Expand All @@ -220,8 +260,11 @@
executable="gcc">
<arg value="-v"/>
<arg value="-I/usr/local/"/>
<arg value="-I/usr/include/"/>
<arg value="-I${java-home}/include/"/>
<arg value="-I${java-home}/include/linux/"/>
<arg value="-I${daos-build-dir}/include"/>
<arg value="-I${protobufc-build-dir}"/>
<arg value="-I${sl-prefix}/include/"/>
<arg value="-I${sl-protobufc-prefix}/include/"/>
<arg value="-I${project.basedir}/src/main/native/include/"/>
Expand All @@ -242,6 +285,9 @@
<arg value="${native.build.path}/io_daos_DaosClient.o"/>
<arg value="${native.build.path}/io_daos_obj_DaosObjClient.o"/>
<arg value="-L${sl-prefix}/lib"/>
<arg value="-L${daos-build-dir}/common"/>
<arg value="-L${daos-build-dir}/client/api/"/>
<arg value="-L${protobufc-build-dir}/protobuf-c/.libs/"/>
<arg value="-L${sl-prefix}/lib64"/>
<arg value="-L${sl-protobufc-prefix}/lib"/>
<arg value="-L/usr/lib"/>
Expand All @@ -257,13 +303,31 @@
<arg value="-lprotobuf-c"/>
</exec>
<copy file="${native.build.path}/libdaos-jni.so" todir="${project.basedir}/target/classes"/>
</tasks>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
<version>1.0b3</version>
<exclusions>
<exclusion>
<groupId>ant</groupId>
<artifactId>ant</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant-nodeps</artifactId>
<version>1.8.1</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
Expand Down
2 changes: 2 additions & 0 deletions src/client/java/distribution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
<descriptors>
<descriptor>src/assembly/make-assembly.xml</descriptor>
</descriptors>
<tarLongFileMode>posix</tarLongFileMode>
</configuration>
<executions>
<execution>
Expand All @@ -55,6 +56,7 @@
<descriptors>
<descriptor>src/assembly/make-assembly-with-dependencies.xml</descriptor>
</descriptors>
<tarLongFileMode>posix</tarLongFileMode>
</configuration>
<executions>
<execution>
Expand Down
86 changes: 86 additions & 0 deletions src/tests/ftest/java/ci_integration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
#!/usr/bin/python3
"""
(C) Copyright 2020 Intel Corporation.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

GOVERNMENT LICENSE RIGHTS-OPEN SOURCE SOFTWARE
The Government's rights to use, modify, reproduce, release, perform, display,
or disclose this software are subject to the terms of the Apache License as
provided in Contract No. B609815.
Any reproduction of computer software, computer software documentation, or
portions thereof marked with this legend must also reproduce the markings.
"""
import os
from general_utils import error_count
from java_utils import JavaUtils

class JavaCIIntegration(JavaUtils):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(pylint-too-many-ancestors) Too many ancestors (8/7)

"""Test class Description:

Create a DAOS pool and container and use their
uuid's to run the java-hadoop integration tests
using maven.

:avocado: recursive
"""

def test_java_hadoop_it(self):
"""Jira ID: DAOS-4093

Test Description:
Create a DAOS pool and container and use their
uuid's to run the java-hadoop integration tests
using maven.

:avocado: tags=all,pr,hw,small,javaciintegration
"""
# Copy built java folder to /var/tmp.
# Need to be copied to perform maven operations.
test_jdir = str("{}/../java".format(os.getcwd()))
cp_cmd = "cp -r {} {}/..".format(test_jdir, self.log_dir)
self.run_command(self.hostlist_clients, [cp_cmd])

# get java dir
self.jdir = str("{}/../java".format(self.log_dir))

# create pool and container
pool = self._create_pool()
container = self._create_cont(pool)

# obtain java version
version = self.java_version()

# output file
output_file = "{}/maven_integration_test_output.log".\
format(self.log_dir)

# run intergration-test
cmd = "cd {};".format(self.jdir)
cmd += " export LD_PRELOAD={}/jre/lib/amd64/libjsig.so;".format(version)
cmd += " ls -l daos-java/target/antrun/build-compile-proto.xml;"
cmd += " mvn -X integration-test -Ddaos.install.path={}".\
format(self.prefix)
cmd += " -Dpool_id={} -Dcont_id={} ".format(pool.uuid, container.uuid)
cmd += " >> {}".format(output_file)
print("***{}".format(cmd))

self.run_command(self.hostlist_clients, [cmd], True, 120)
# look for errors
found_errors = error_count("Errors: [1-9]+", self.hostlist_clients,
output_file, 'Errors: [0-9]')
self.log.info("Matched error lines: %s", found_errors[0])

if found_errors[0] > 0:
self.fail("Java Integration test failed. Check"
" maven_integration_test_output.log for more details.")
21 changes: 21 additions & 0 deletions src/tests/ftest/java/ci_integration.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
hosts:
test_servers:
- server-A
test_clients:
- client-B
timeout: 600
server_config:
name: daos_server
servers:
log_mask: INFO
scm_class: dcpm
scm_list: ["/dev/pmem0"]
pool:
mode: 146 # 146 is RW
name: daos_server
scm_size: 10000000000
svcn: 1
control_method: dmg
container:
type: POSIX
control_method: daos
Loading