Skip to content
This repository was archived by the owner on Nov 15, 2022. It is now read-only.

Commit 9a80705

Browse files
Kokil Jainarindam-bandyopadhyay
authored andcommitted
NoBug: Create a new test suite in CI pipeline for persistence tests (#22059)
1 parent ccacf87 commit 9a80705

File tree

78 files changed

+2166
-903
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+2166
-903
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
#
2+
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3+
#
4+
# Copyright (c) 2017 Oracle and/or its affiliates. All rights reserved.
5+
#
6+
# The contents of this file are subject to the terms of either the GNU
7+
# General Public License Version 2 only ("GPL") or the Common Development
8+
# and Distribution License("CDDL") (collectively, the "License"). You
9+
# may not use this file except in compliance with the License. You can
10+
# obtain a copy of the License at
11+
# https://oss.oracle.com/licenses/CDDL+GPL-1.1
12+
# or LICENSE.txt. See the License for the specific
13+
# language governing permissions and limitations under the License.
14+
#
15+
# When distributing the software, include this License Header Notice in each
16+
# file and include the License file at LICENSE.txt.
17+
#
18+
# GPL Classpath Exception:
19+
# Oracle designates this particular file as subject to the "Classpath"
20+
# exception as provided by Oracle in the GPL Version 2 section of the License
21+
# file that accompanied this code.
22+
#
23+
# Modifications:
24+
# If applicable, add the following below the License Header, with the fields
25+
# enclosed by brackets [] replaced by your own identifying information:
26+
# "Portions Copyright [year] [name of copyright owner]"
27+
#
28+
# Contributor(s):
29+
# If you wish your version of this file to be governed by only the CDDL or
30+
# only the GPL Version 2, indicate your decision by adding "[Contributor]
31+
# elects to include this software in this distribution under the [CDDL or GPL
32+
# Version 2] license." If you don't indicate a single choice of license, a
33+
# recipient has the option to distribute your version of this file under
34+
# either the CDDL, the GPL Version 2 or to extend the choice of license to
35+
# its licensees as provided above. However, if you add GPL Version 2 code
36+
# and therefore, elected the GPL Version 2 license, then the option applies
37+
# only if the new code is made subject to such option by the copyright
38+
# holder.
39+
#
40+
41+
db.port=1527
42+
db.host=localhost
43+
db.type=derby
44+
db.name=testdb
45+
db.user=dbuser
46+
db.pwd=dbpassword
47+
db.driver=org.apache.derby.jdbc.ClientDriver
48+
db.class=org.apache.derby.jdbc.ClientDataSource
49+
db.url=jdbc:derby://${db.host}:${db.port}/${db.name};create=true;
50+
db.driver.props=User=${db.user}:Password=${db.pwd}:dataBaseName=${db.name}:serverName=${db.host}:portNumber=${db.port}:retrieveMessagesFromServerOnGetMessage=true:serverName=localhost:connectionAttributes=\\;create\\=true
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
#
2+
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3+
#
4+
# Copyright (c) 2017 Oracle and/or its affiliates. All rights reserved.
5+
#
6+
# The contents of this file are subject to the terms of either the GNU
7+
# General Public License Version 2 only ("GPL") or the Common Development
8+
# and Distribution License("CDDL") (collectively, the "License"). You
9+
# may not use this file except in compliance with the License. You can
10+
# obtain a copy of the License at
11+
# https://oss.oracle.com/licenses/CDDL+GPL-1.1
12+
# or LICENSE.txt. See the License for the specific
13+
# language governing permissions and limitations under the License.
14+
#
15+
# When distributing the software, include this License Header Notice in each
16+
# file and include the License file at LICENSE.txt.
17+
#
18+
# GPL Classpath Exception:
19+
# Oracle designates this particular file as subject to the "Classpath"
20+
# exception as provided by Oracle in the GPL Version 2 section of the License
21+
# file that accompanied this code.
22+
#
23+
# Modifications:
24+
# If applicable, add the following below the License Header, with the fields
25+
# enclosed by brackets [] replaced by your own identifying information:
26+
# "Portions Copyright [year] [name of copyright owner]"
27+
#
28+
# Contributor(s):
29+
# If you wish your version of this file to be governed by only the CDDL or
30+
# only the GPL Version 2, indicate your decision by adding "[Contributor]
31+
# elects to include this software in this distribution under the [CDDL or GPL
32+
# Version 2] license." If you don't indicate a single choice of license, a
33+
# recipient has the option to distribute your version of this file under
34+
# either the CDDL, the GPL Version 2 or to extend the choice of license to
35+
# its licensees as provided above. However, if you add GPL Version 2 code
36+
# and therefore, elected the GPL Version 2 license, then the option applies
37+
# only if the new code is made subject to such option by the copyright
38+
# holder.
39+
#
40+
41+
db.port=3306
42+
db.host=asqe-core1.us.oracle.com
43+
db.type=mysql
44+
db.name=dbsmpl1
45+
# schema name is the same as the user name in CAPS
46+
db.schema=DBUSER
47+
db.user=dbuser
48+
db.pwd=dbpassword
49+
db.driver=com.mysql.jdbc.Driver
50+
db.class=com.mysql.jdbc.jdbc2.optional.MysqlDataSource
51+
db.url=jdbc:mysql://${db.host}:${db.port}/${db.name}
52+
connector.url=jdbc\\:mysql\\://${db.host}\\:${db.port}/${db.name}
53+
54+
db.driver.props=User=${db.user}:Password=${db.pwd}:url=${connector.url}:retrieveMessagesFromServerOnGetMessage=true:connectionAttributes=\\;create\\=true
55+
db.target=mysql
56+
57+
# property used by deployment module
58+
db.driver.dir=${env.APS_HOME}/devtests/persistence/lib/drivers/mysql
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
#
2+
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3+
#
4+
# Copyright (c) 2017 Oracle and/or its affiliates. All rights reserved.
5+
#
6+
# The contents of this file are subject to the terms of either the GNU
7+
# General Public License Version 2 only ("GPL") or the Common Development
8+
# and Distribution License("CDDL") (collectively, the "License"). You
9+
# may not use this file except in compliance with the License. You can
10+
# obtain a copy of the License at
11+
# https://oss.oracle.com/licenses/CDDL+GPL-1.1
12+
# or LICENSE.txt. See the License for the specific
13+
# language governing permissions and limitations under the License.
14+
#
15+
# When distributing the software, include this License Header Notice in each
16+
# file and include the License file at LICENSE.txt.
17+
#
18+
# GPL Classpath Exception:
19+
# Oracle designates this particular file as subject to the "Classpath"
20+
# exception as provided by Oracle in the GPL Version 2 section of the License
21+
# file that accompanied this code.
22+
#
23+
# Modifications:
24+
# If applicable, add the following below the License Header, with the fields
25+
# enclosed by brackets [] replaced by your own identifying information:
26+
# "Portions Copyright [year] [name of copyright owner]"
27+
#
28+
# Contributor(s):
29+
# If you wish your version of this file to be governed by only the CDDL or
30+
# only the GPL Version 2, indicate your decision by adding "[Contributor]
31+
# elects to include this software in this distribution under the [CDDL or GPL
32+
# Version 2] license." If you don't indicate a single choice of license, a
33+
# recipient has the option to distribute your version of this file under
34+
# either the CDDL, the GPL Version 2 or to extend the choice of license to
35+
# its licensees as provided above. However, if you add GPL Version 2 code
36+
# and therefore, elected the GPL Version 2 license, then the option applies
37+
# only if the new code is made subject to such option by the copyright
38+
# holder.
39+
#
40+
41+
db.port=1521
42+
db.host=asqe-db1.us.oracle.com
43+
db.sid=asqedb
44+
db.type=oracle
45+
db.name=${db.sid}
46+
#The schema name must be in CAPS and the value is the same as db.user
47+
db.schema=SMOKELINUX
48+
db.user=smokelinux
49+
db.pwd=smokelinux
50+
db.driver=com.inet.ora.OraDriver
51+
db.class=com.inet.ora.OraDataSource
52+
db.url=jdbc:inetora::${db.host}:${db.port}:${db.sid}
53+
54+
db.driver.props=User=${db.user}:Password=${db.pwd}:ServerName=${db.host}:Port=${db.port}:ServiceName=${db.sid}:retrieveMessagesFromServerOnGetMessage=true:connectionAttributes=\\;create\\=true
55+
56+
# property used by deployment module
57+
db.driver.dir=${env.APS_HOME}/devtests/persistence/lib/drivers/oracle/inet
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,45 @@
1+
<!--
2+
3+
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
4+
5+
Copyright (c) 2017 Oracle and/or its affiliates. All rights reserved.
6+
7+
The contents of this file are subject to the terms of either the GNU
8+
General Public License Version 2 only ("GPL") or the Common Development
9+
and Distribution License("CDDL") (collectively, the "License"). You
10+
may not use this file except in compliance with the License. You can
11+
obtain a copy of the License at
12+
https://oss.oracle.com/licenses/CDDL+GPL-1.1
13+
or LICENSE.txt. See the License for the specific
14+
language governing permissions and limitations under the License.
15+
16+
When distributing the software, include this License Header Notice in each
17+
file and include the License file at LICENSE.txt.
18+
19+
GPL Classpath Exception:
20+
Oracle designates this particular file as subject to the "Classpath"
21+
exception as provided by Oracle in the GPL Version 2 section of the License
22+
file that accompanied this code.
23+
24+
Modifications:
25+
If applicable, add the following below the License Header, with the fields
26+
enclosed by brackets [] replaced by your own identifying information:
27+
"Portions Copyright [year] [name of copyright owner]"
28+
29+
Contributor(s):
30+
If you wish your version of this file to be governed by only the CDDL or
31+
only the GPL Version 2, indicate your decision by adding "[Contributor]
32+
elects to include this software in this distribution under the [CDDL or GPL
33+
Version 2] license." If you don't indicate a single choice of license, a
34+
recipient has the option to distribute your version of this file under
35+
either the CDDL, the GPL Version 2 or to extend the choice of license to
36+
its licensees as provided above. However, if you add GPL Version 2 code
37+
and therefore, elected the GPL Version 2 license, then the option applies
38+
only if the new code is made subject to such option by the copyright
39+
holder.
40+
41+
-->
42+
143
<!--
244
This is the top level persistence build file that should be
345
imported into all the leaf level persistence build files
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
#!/bin/bash -ex
2+
#
3+
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
4+
#
5+
# Copyright (c) 2017 Oracle and/or its affiliates. All rights reserved.
6+
#
7+
# The contents of this file are subject to the terms of either the GNU
8+
# General Public License Version 2 only ("GPL") or the Common Development
9+
# and Distribution License("CDDL") (collectively, the "License"). You
10+
# may not use this file except in compliance with the License. You can
11+
# obtain a copy of the License at
12+
# https://oss.oracle.com/licenses/CDDL+GPL-1.1
13+
# or LICENSE.txt. See the License for the specific
14+
# language governing permissions and limitations under the License.
15+
#
16+
# When distributing the software, include this License Header Notice in each
17+
# file and include the License file at LICENSE.txt.
18+
#
19+
# GPL Classpath Exception:
20+
# Oracle designates this particular file as subject to the "Classpath"
21+
# exception as provided by Oracle in the GPL Version 2 section of the License
22+
# file that accompanied this code.
23+
#
24+
# Modifications:
25+
# If applicable, add the following below the License Header, with the fields
26+
# enclosed by brackets [] replaced by your own identifying information:
27+
# "Portions Copyright [year] [name of copyright owner]"
28+
#
29+
# Contributor(s):
30+
# If you wish your version of this file to be governed by only the CDDL or
31+
# only the GPL Version 2, indicate your decision by adding "[Contributor]
32+
# elects to include this software in this distribution under the [CDDL or GPL
33+
# Version 2] license." If you don't indicate a single choice of license, a
34+
# recipient has the option to distribute your version of this file under
35+
# either the CDDL, the GPL Version 2 or to extend the choice of license to
36+
# its licensees as provided above. However, if you add GPL Version 2 code
37+
# and therefore, elected the GPL Version 2 license, then the option applies
38+
# only if the new code is made subject to such option by the copyright
39+
# holder.
40+
41+
list_test_ids(){
42+
echo persistence_all
43+
}
44+
45+
test_run(){
46+
$S1AS_HOME/bin/asadmin start-domain
47+
$S1AS_HOME/bin/asadmin start-database
48+
cd $APS_HOME/devtests/persistence/tests/packaging
49+
ant $TARGET | tee $TEST_RUN_LOG
50+
$S1AS_HOME/bin/asadmin stop-database
51+
$S1AS_HOME/bin/asadmin stop-domain
52+
}
53+
54+
run_test_id(){
55+
#a common util script located at main/appserver/tests/common_test.sh
56+
source `dirname $0`/../../../common_test.sh
57+
kill_process
58+
delete_gf
59+
download_test_resources glassfish.zip version-info.txt
60+
unzip_test_resources $WORKSPACE/bundles/glassfish.zip
61+
cd `dirname $0`
62+
test_init
63+
get_test_target $1
64+
#run the actual test function
65+
test_run
66+
check_successful_run
67+
generate_junit_report $1
68+
change_junit_report_class_names
69+
}
70+
71+
post_test_run(){
72+
copy_test_artifects
73+
upload_test_results
74+
delete_bundle
75+
cd -
76+
}
77+
78+
get_test_target(){
79+
case $1 in
80+
persistence_all )
81+
TARGET=all
82+
export TARGET;;
83+
esac
84+
}
85+
86+
OPT=$1
87+
TEST_ID=$2
88+
case $OPT in
89+
list_test_ids )
90+
list_test_ids;;
91+
run_test_id )
92+
trap post_test_run EXIT
93+
run_test_id $TEST_ID ;;
94+
esac
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,46 @@
11
<?xml version="1.0" encoding="ISO-8859-1"?>
22

3+
<!--
4+
5+
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
6+
7+
Copyright (c) 2017 Oracle and/or its affiliates. All rights reserved.
8+
9+
The contents of this file are subject to the terms of either the GNU
10+
General Public License Version 2 only ("GPL") or the Common Development
11+
and Distribution License("CDDL") (collectively, the "License"). You
12+
may not use this file except in compliance with the License. You can
13+
obtain a copy of the License at
14+
https://oss.oracle.com/licenses/CDDL+GPL-1.1
15+
or LICENSE.txt. See the License for the specific
16+
language governing permissions and limitations under the License.
17+
18+
When distributing the software, include this License Header Notice in each
19+
file and include the License file at LICENSE.txt.
20+
21+
GPL Classpath Exception:
22+
Oracle designates this particular file as subject to the "Classpath"
23+
exception as provided by Oracle in the GPL Version 2 section of the License
24+
file that accompanied this code.
25+
26+
Modifications:
27+
If applicable, add the following below the License Header, with the fields
28+
enclosed by brackets [] replaced by your own identifying information:
29+
"Portions Copyright [year] [name of copyright owner]"
30+
31+
Contributor(s):
32+
If you wish your version of this file to be governed by only the CDDL or
33+
only the GPL Version 2, indicate your decision by adding "[Contributor]
34+
elects to include this software in this distribution under the [CDDL or GPL
35+
Version 2] license." If you don't indicate a single choice of license, a
36+
recipient has the option to distribute your version of this file under
37+
either the CDDL, the GPL Version 2 or to extend the choice of license to
38+
its licensees as provided above. However, if you add GPL Version 2 code
39+
and therefore, elected the GPL Version 2 license, then the option applies
40+
only if the new code is made subject to such option by the copyright
41+
holder.
42+
43+
-->
344
<!DOCTYPE project [
445
<!ENTITY commonSetup SYSTEM "./../../../../config/properties.xml">
546
<!ENTITY commonBuild SYSTEM "./../../../../config/common.xml">

0 commit comments

Comments
 (0)