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

[WFLY-11944] Some clustering test cases do not close JNDI context between tests #12207

Merged
merged 1 commit into from Apr 5, 2019

Conversation

@rachmatowicz
Copy link
Contributor

rachmatowicz commented Apr 4, 2019

This PR adjusts the use of RemoteEJBDirectory for a few clustering test cases, making it non-static as opposed to static. Static use is not advised as it negatively affects EJB client invocation.

The JIRA issue: https://issues.jboss.org/browse/WFLY-11944

* NOTE:
* if you hold a static reference to this class, it causes any JNDI lookups across different tests to use the same discovered node registry (DNR).
* This can cause server starts and stops in one test to contaminate other tests and produce incorrect results.
* It is adviseable to use one instance per test by defining a @Before and @After method to create and dispose of the instance on a per test basis.

This comment has been minimized.

Copy link
@pferraro

pferraro Apr 4, 2019

Contributor

Generally, it is inadvisable to hold any references to an EJBDirectory.
The preferred pattern of usage is:

for (EJBDirectory directory = new RemoteEJBDirectory(MODULE_NAME)) {
   // lookup EJBs
   // invoke EJBs
   // remove EJBs
}
@bstansberry bstansberry merged commit 9c7871a into wildfly:master Apr 5, 2019
5 of 6 checks passed
5 of 6 checks passed
Windows - JDK 11 Finished TeamCity Build WildFly / Pull Request / Windows - JDK 11 : Tests failed: 1 (1 new), passed: 4614, ignored: 135
Details
Linux - JDK 11 (Pull Request) - merge TeamCity build finished
Details
Linux - JDK 8 Finished TeamCity Build WildFly / Pull Request / Linux - JDK 8 : Tests passed: 4842, ignored: 134
Details
Linux - elytron - JDK 8 (Pull Request) - merge TeamCity build finished
Details
Linux with security manager - JDK 8 Finished TeamCity Build WildFly / Pull Request / Linux SM - JDK 8 : Tests passed: 4498, ignored: 152
Details
Windows - JDK 8 Finished TeamCity Build WildFly / Pull Request / Windows - JDK 8 : Tests passed: 4835, ignored: 139
Details
@rachmatowicz rachmatowicz deleted the rachmatowicz:WFLY-11944 branch Nov 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.