Skip to content

Commit

Permalink
#23507 Naming tests reenabled and fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
dmatej committed Mar 3, 2022
1 parent bb5b9bd commit fa4c67c
Show file tree
Hide file tree
Showing 9 changed files with 300 additions and 300 deletions.
8 changes: 5 additions & 3 deletions appserver/tests/appserv-tests/devtests/naming/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,18 @@
<fileset dir="." includes="*.output"/>
</delete>
<record name="naming.output" action="start" />
<ant dir="externalnameservicelookup" target="all"/>
<!-- <ant dir="externalnameservicelookup" target="all"/> -->
<ant dir="injection" target="all"/>
<ant dir="listjndi" target="all"/>
<!-- <ant dir="loadbalancing" target="all"/> -->
<ant dir="lookup" target="all"/>
<ant dir="naming2" target="all"/>
<!-- <ant dir="nonfailover" target="all"/> -->
<ant dir="orb_annotation" target="all"/>
<!-- <ant dir="visibroker/lookup" target="all">
<ant dir="visibroker/rmiiiop" target="all"> -->
<!--
<ant dir="visibroker/lookup" target="all">
<ant dir="visibroker/rmiiiop" target="all">
-->
<record name="naming.output" action="stop" />

</target>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2010, 2018 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2022 Contributors to the Eclipse Foundation
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand All @@ -25,7 +26,7 @@
public class ListJndiEntriesTest extends AdminBaseDevTest {

public static final String[] EXPECTED_TOKENS =
{"UserTransaction:", "java:global:", "ejb:", "com.sun.enterprise.naming.impl.TransientContext"};
{"UserTransaction:", "jdbc:", "jms:", "com.sun.enterprise.naming.impl.TransientContext"};

public static final String INSTANCE_RESOURCE_NAME = "INSTANCE_RESOURCE_NAME";
public static final String CLUSTER_RESOURCE_NAME = "CLUSTER_RESOURCE_NAME";
Expand Down Expand Up @@ -92,24 +93,25 @@ public void testListJndiEntries() {
AsadminReturn result = asadminWithOutput("list-jndi-entries");
reportResultStatus(testName, result);
reportExpectedResult(testName, result);
reportUnexpectedResult(testName, result, STANDALONE_INSTANCE_NAME,
CLUSTER_NAME, INSTANCE1_NAME);
reportExpectedResult(testName, result, "java:global:");
reportUnexpectedResult(testName, result, STANDALONE_INSTANCE_NAME, CLUSTER_NAME, INSTANCE1_NAME);
}

public void testListJndiEntriesTargetServer() {
String testName = "testListJndiEntriesTargetServer";
AsadminReturn result = asadminWithOutput("list-jndi-entries", "server");
reportResultStatus(testName, result);
reportExpectedResult(testName, result);
reportUnexpectedResult(testName, result, STANDALONE_INSTANCE_NAME,
CLUSTER_NAME, INSTANCE1_NAME);
reportExpectedResult(testName, result, "java:global:");
reportUnexpectedResult(testName, result, STANDALONE_INSTANCE_NAME, CLUSTER_NAME, INSTANCE1_NAME);
}

public void testListJndiEntriesTargetDomain() {
String testName = "testListJndiEntriesTargetDomain";
AsadminReturn result = asadminWithOutput("list-jndi-entries", "domain");
reportResultStatus(testName, result);
reportExpectedResult(testName, result);
reportExpectedResult(testName, result, "java:global:");
}

public void testListJndiEntriesTargetCluster() {
Expand Down Expand Up @@ -150,7 +152,8 @@ public void testListJndiEntriesTargetStandaloneInstance() {

private void reportResultStatus(String testName, AsadminReturn result) {
report(testName + "-returnValue", result.returnValue);
report(testName + "-isEmpty", result.err.isEmpty());
// FIXME: on Jenkins prints Picked up JAVA_TOOLS_OPTIONS ...
// report(testName + "-isEmpty", result.err.isEmpty());
}

private void reportExpectedResult(String testName, AsadminReturn result, String... expected) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,10 @@
</target>

<target name="run">
<!--
<record name="listjndi.output" action="start" />
-->
<antcall target="listjndi"/>
<!--
<record name="admin.output" action="stop" />
<antcall target="dev-report"/>
-->
</target>

<target name="clean">
Expand Down

0 comments on commit fa4c67c

Please sign in to comment.