On 8/25/2016 12:31 PM, Artem Smotrakov wrote:
Those tests which modify default JSSE parameters should be run in othervm mode. 
But other tests which don't do that can be safely run in agent VM. This test 
doesn't seem to modify any default JSSE parameter.

If this test get booted, other test that need to do more customization may not work any more.

For example, boolean variable A is a singleton static field, default is true. If A get initialized in default mode, it is "true". It is not possible to customize it to "false" any more in other test in agentvm/samevm mode.

This test has no impact in agentvm/samevm mode unless no test run in agentvm/samevm mode or all tests run in agentvm/samevm mode has the same configuration as this one. This assumption is too strong to follow.

Xuelei

Artem


----- Original Message -----
From: xuelei....@oracle.com
To: artem.smotra...@oracle.com
Cc: security-dev@openjdk.java.net, svetlana.nikandr...@oracle.com
Sent: Wednesday, August 24, 2016 8:20:45 PM GMT -08:00 US/Canada Pacific
Subject: Re: RFR 8164533: [TEST_BUG] sun/security/ssl/SSLSocketImpl/CloseSocket.java 
failed with "Error while cleaning up threads after test"



On 8/25/2016 11:17 AM, Artem Smotrakov wrote:
Hi Xuelei,

Yes, I know that JSSE provider initializes only once. But I suppose that tests 
which use default JSSE configuration (like this test) can be safely run in 
agent VM. Am I missing something?

The default one can be customized.  For example, the protocols, cipher
suites, etc.  So it is not safe to run in agentvm/samevm mode.

Xuelei

Artem

----- Original Message -----
From: xuelei....@oracle.com
To: artem.smotra...@oracle.com, security-dev@openjdk.java.net
Cc: svetlana.nikandr...@oracle.com
Sent: Wednesday, August 24, 2016 7:21:55 PM GMT -08:00 US/Canada Pacific
Subject: Re: RFR 8164533: [TEST_BUG] sun/security/ssl/SSLSocketImpl/CloseSocket.java 
failed with "Error while cleaning up threads after test"

On 8/25/2016 9:27 AM, Artem Smotrakov wrote:
BTW, please run the test in othervm mode.
Why do you think it's necessary here? I don't see the test modifies
anything that may affect other tests running in the same JVM (for
example, system properties). Am I missing something?
It's not about the test code, but about the JSSE impl.  The JSSE impl
uses a lot of singleton static fields for performance.  Once these
fields are initialized, they may impact other test cases.

In JSSE test cases, we always run in othervm mode, and put a comment
like (See test/javax/net/ssl/templates/SSLSocketTemplate.java):

// SunJSSE does not support dynamic system properties, no way to re-use
// system properties in samevm/agentvm mode.


Xuelei

Reply via email to