-
Notifications
You must be signed in to change notification settings - Fork 878
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert jaxws tests to java (#12509)
Co-authored-by: Jay DeLuca <[email protected]>
- Loading branch information
Showing
39 changed files
with
792 additions
and
773 deletions.
There are no files selected for viewing
27 changes: 0 additions & 27 deletions
27
instrumentation/jaxws/jaxws-2.0-axis2-1.6/javaagent/src/test/groovy/Axis2JaxWsTest.groovy
This file was deleted.
Oops, something went wrong.
50 changes: 50 additions & 0 deletions
50
...agent/src/test/java/io/opentelemetry/javaagent/instrumentation/axis2/Axis2JaxWs2Test.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
* Copyright The OpenTelemetry Authors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package io.opentelemetry.javaagent.instrumentation.axis2; | ||
|
||
import io.opentelemetry.javaagent.instrumentation.jaxws.v2_0.AbstractJaxWs2Test; | ||
import java.io.File; | ||
import java.io.IOException; | ||
import java.nio.charset.StandardCharsets; | ||
import org.apache.commons.io.FileUtils; | ||
import org.apache.commons.io.IOUtils; | ||
|
||
class Axis2JaxWs2Test extends AbstractJaxWs2Test { | ||
static { | ||
try { | ||
updateConfiguration(); | ||
} catch (IOException exception) { | ||
throw new IllegalStateException(exception); | ||
} | ||
} | ||
|
||
private static void updateConfiguration() throws IOException { | ||
// read default configuration file inside axis2 jar | ||
String configuration = | ||
IOUtils.toString( | ||
Axis2JaxWs2Test.class.getClassLoader().getResourceAsStream("axis2.xml"), | ||
StandardCharsets.UTF_8); | ||
|
||
// customize deployer so axis2 can find our services | ||
configuration = | ||
configuration.replace( | ||
"org.apache.axis2.jaxws.framework.JAXWSDeployer", CustomJaxWsDeployer.class.getName()); | ||
configuration = | ||
configuration.replace( | ||
"<!--<parameter name=\"servicePath\">services</parameter>-->", | ||
"<parameter name=\"servicePath\">ws</parameter>"); | ||
configuration = | ||
configuration.replace( | ||
"<parameter name=\"useGeneratedWSDLinJAXWS\">false</parameter>", | ||
"<parameter name=\"useGeneratedWSDLinJAXWS\">true</parameter>"); | ||
configuration = configuration.replace("<module ref=\"addressing\"/>", ""); | ||
|
||
File configurationDirectory = new File("build/axis-conf/"); | ||
configurationDirectory.mkdirs(); | ||
FileUtils.writeStringToFile( | ||
new File(configurationDirectory, "axis2.xml"), configuration, StandardCharsets.UTF_8); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
207 changes: 0 additions & 207 deletions
207
instrumentation/jaxws/jaxws-2.0-common-testing/src/main/groovy/AbstractJaxWsTest.groovy
This file was deleted.
Oops, something went wrong.
16 changes: 0 additions & 16 deletions
16
instrumentation/jaxws/jaxws-2.0-common-testing/src/main/groovy/hello/BaseHelloService.groovy
This file was deleted.
Oops, something went wrong.
24 changes: 0 additions & 24 deletions
24
instrumentation/jaxws/jaxws-2.0-common-testing/src/main/groovy/hello/HelloService.groovy
This file was deleted.
Oops, something went wrong.
19 changes: 0 additions & 19 deletions
19
instrumentation/jaxws/jaxws-2.0-common-testing/src/main/groovy/hello/HelloServiceImpl.groovy
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.