Skip to content
This repository was archived by the owner on May 28, 2018. It is now read-only.

Commit b4bed81

Browse files
committed
J-436: "Setup existing performance tests to run in WLS"
Change-Id: I9146c643239842f9022aa11f893760350ccc5b8a
1 parent 0c15bdc commit b4bed81

File tree

47 files changed

+1057
-916
lines changed

Some content is hidden

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

47 files changed

+1057
-916
lines changed

etc/config/copyright-exclude

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,5 @@ build.readme
5252
/test/resources/org/glassfish/jersey/server/config/jaxrs-components
5353
/tests/e2e/src/test/resources/org/glassfish/jersey/tests/e2e/entity/xxe.txt
5454
/core-server/src/main/java/com/sun/research/ws/wadl
55-
/bundles/repackaged/jersey-jsr166e/src/main/java/jersey/repackaged/jsr166e
55+
/bundles/repackaged/jersey-jsr166e/src/main/java/jersey/repackaged/jsr166e
56+
/tests/performance/test-cases/src/data/MEASUREMENT_DATA
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
#!/bin/bash
2+
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3+
#
4+
# Copyright (c) 2015 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+
# http://glassfish.java.net/public/CDDL+GPL_1_1.html
12+
# or packager/legal/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 packager/legal/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+
WEBLOGIC_URL=$1
42+
43+
TARGET=$PWD/target
44+
OPT=$TARGET/opt
45+
46+
rm -rf $TARGET
47+
mkdir -p $OPT
48+
49+
cd $TARGET
50+
rm -f wls.jar
51+
wget --no-proxy $WEBLOGIC_URL -O wls.jar
52+
53+
cd $OPT
54+
java -jar $TARGET/wls.jar
55+
cd wls*
56+
57+
MW_HOME=`pwd`
58+
echo $MW_HOME > $TARGET/mw_home.txt
59+
60+
. $MW_HOME/wlserver/server/bin/setWLSEnv.sh
61+
62+
TEST_DOMAIN=$MW_HOME/hudson_test_domain
63+
64+
mkdir -p $TEST_DOMAIN
65+
cd $TEST_DOMAIN
66+
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
#!/bin/bash
2+
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3+
#
4+
# Copyright (c) 2015 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+
# http://glassfish.java.net/public/CDDL+GPL_1_1.html
12+
# or packager/legal/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 packager/legal/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+
TARGET=$PWD/target
42+
MW_HOME=`cat $TARGET/mw_home.txt`
43+
TEST_DOMAIN=$MW_HOME/hudson_test_domain
44+
PID_FILE=$TARGET/wls.pid
45+
46+
echo $TEST_DOMAIN > $TARGET/test_domain.txt
47+
48+
cd $MW_HOME
49+
. $MW_HOME/wlserver/server/bin/setWLSEnv.sh
50+
51+
mkdir -p $TEST_DOMAIN
52+
cd $TEST_DOMAIN
53+
54+
JAVA_OPTIONS="-javaagent:$HOME/jersey-perftest-agent.jar"
55+
56+
ln -s $TEST_DOMAIN/autodeploy $TARGET/autodeploy
57+
58+
yes | nohup java -server \
59+
-Xmx1024m \
60+
-XX:MaxPermSize=256m \
61+
-Dweblogic.Domain=HudsonTestDomain \
62+
-Dweblogic.Name=HudsonTestServer \
63+
-Dweblogic.management.username=weblogic \
64+
-Dweblogic.management.password=weblogic1 \
65+
-Dweblogic.ListenPort=7001 \
66+
-Djava.security.egd=file:/dev/./urandom \
67+
-Djava.net.preferIPv4Stack=true \
68+
-Dcom.sun.management.jmxremote \
69+
-Dcom.sun.management.jmxremote.port=11112 \
70+
-Dcom.sun.management.jmxremote.authenticate=false \
71+
-Dcom.sun.management.jmxremote.ssl=false \
72+
-Dcom.sun.management.jmxremote.local.only=false \
73+
$JAVA_OPTIONS \
74+
weblogic.Server &
75+
76+
echo $! > $PID_FILE
77+
78+
# wait for server to start
79+
echo "******** WAITING FOR SERVER TO START"
80+
while ! netstat -na | grep 7001; do sleep 5; echo "."; done
81+
echo "******** SERVER IS READY"
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#!/bin/bash
2+
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3+
#
4+
# Copyright (c) 2015 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+
# http://glassfish.java.net/public/CDDL+GPL_1_1.html
12+
# or packager/legal/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 packager/legal/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+
TARGET=$PWD/target
42+
PID_FILE=$TARGET/wls.pid
43+
44+
if test -f $PID_FILE; then
45+
kill -9 `cat $PID_FILE`
46+
rm $PID_FILE
47+
fi
Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
44
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
55
6-
Copyright (c) 2012-2015 Oracle and/or its affiliates. All rights reserved.
6+
Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved.
77
88
The contents of this file are subject to the terms of either the GNU
99
General Public License Version 2 only ("GPL") or the Common Development
@@ -40,20 +40,19 @@
4040
holder.
4141
4242
-->
43-
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
44-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
45-
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
46-
<id>zip-with-jars</id>
47-
<formats>
48-
<format>zip</format>
49-
</formats>
50-
<includeBaseDirectory>false</includeBaseDirectory>
51-
<dependencySets>
52-
<dependencySet>
53-
<outputDirectory>/</outputDirectory>
54-
<useProjectArtifact>true</useProjectArtifact>
55-
<unpack>false</unpack>
56-
<scope>runtime</scope>
57-
</dependencySet>
58-
</dependencySets>
59-
</assembly>
43+
<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">
44+
<modelVersion>4.0.0</modelVersion>
45+
46+
<parent>
47+
<groupId>org.glassfish.jersey.tests.performance.testcases</groupId>
48+
<artifactId>project</artifactId>
49+
<version>2.17-SNAPSHOT</version>
50+
</parent>
51+
52+
<artifactId>assemblies</artifactId>
53+
<packaging>jar</packaging>
54+
55+
<name>jersey-tests-performance-assemblies</name>
56+
<description>Jersey performance test-cases shared assembly types.</description>
57+
58+
</project>

tests/performance/test-cases/mbw-json-jackson/src/main/assembly/zip-with-jars.xml renamed to tests/performance/test-cases/assemblies/src/main/resources/assemblies/war.xml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
12
<!--
23
34
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
45
5-
Copyright (c) 2012-2015 Oracle and/or its affiliates. All rights reserved.
6+
Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved.
67
78
The contents of this file are subject to the terms of either the GNU
89
General Public License Version 2 only ("GPL") or the Common Development
@@ -39,21 +40,26 @@
3940
holder.
4041
4142
-->
42-
43-
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
44-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
45-
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
46-
<id>zip-with-jars</id>
43+
<assembly xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
44+
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
45+
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
46+
<id>war</id>
4747
<formats>
48-
<format>zip</format>
48+
<format>war</format>
4949
</formats>
5050
<includeBaseDirectory>false</includeBaseDirectory>
5151
<dependencySets>
5252
<dependencySet>
53-
<outputDirectory>/</outputDirectory>
53+
<outputDirectory>/WEB-INF/lib</outputDirectory>
5454
<useProjectArtifact>true</useProjectArtifact>
5555
<unpack>false</unpack>
5656
<scope>runtime</scope>
5757
</dependencySet>
5858
</dependencySets>
59+
<fileSets>
60+
<fileSet>
61+
<directory>src/main/webapp</directory>
62+
<outputDirectory>/</outputDirectory>
63+
</fileSet>
64+
</fileSets>
5965
</assembly>

tests/performance/test-cases/monitoring/src/main/assembly/zip-with-jars.xml renamed to tests/performance/test-cases/assemblies/src/main/resources/assemblies/zip-with-jars.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
44
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
55
6-
Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved.
6+
Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved.
77
88
The contents of this file are subject to the terms of either the GNU
99
General Public License Version 2 only ("GPL") or the Common Development
@@ -40,8 +40,8 @@
4040
holder.
4141
4242
-->
43-
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
44-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
43+
<assembly xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
44+
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
4545
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
4646
<id>zip-with-jars</id>
4747
<formats>

tests/performance/test-cases/filter-dynamic/pom.xml

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -80,23 +80,6 @@
8080
<plugin>
8181
<groupId>org.apache.maven.plugins</groupId>
8282
<artifactId>maven-assembly-plugin</artifactId>
83-
<configuration>
84-
<descriptors>
85-
<descriptor>src/main/assembly/zip-with-jars.xml</descriptor>
86-
</descriptors>
87-
</configuration>
88-
<executions>
89-
<execution>
90-
<id>make-assembly</id>
91-
<!-- this is used for inheritance merges -->
92-
<phase>package</phase>
93-
<!-- append to the packaging phase. -->
94-
<goals>
95-
<goal>attached</goal>
96-
<!-- goals == mojos -->
97-
</goals>
98-
</execution>
99-
</executions>
10083
</plugin>
10184
</plugins>
10285
</build>

0 commit comments

Comments
 (0)