fix test issue where JettyTest would fail if JettyWithResponseFilterEnabledTest ran before it (#11803)

this change ensures that JettyTest is setting the properties it needs in case some other test overwrites them
this also changes up the ordering of the call for setProperties to call super's first in case super is setting the same property
This commit is contained in:
TSFenwick 2021-10-18 12:42:41 -07:00 committed by GitHub
parent 938c1493e5
commit 9c15f938fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

View File

@ -104,6 +104,14 @@ public class JettyTest extends BaseJettyTest
private LatchedRequestStateHolder latchedRequestState;
@Override
public void setProperties()
{
// call super.setProperties first in case it is setting the same property as this class
super.setProperties();
System.setProperty("druid.server.http.showDetailedJettyErrors", "true");
}
@Override
protected Injector setupInjector()
{

View File

@ -27,8 +27,9 @@ public class JettyWithResponseFilterEnabledTest extends JettyTest
@Override
public void setProperties()
{
System.setProperty("druid.server.http.showDetailedJettyErrors", "false");
// call super.setProperties first in case it is setting the same property as this class
super.setProperties();
System.setProperty("druid.server.http.showDetailedJettyErrors", "false");
}
@Test