Skip to content

Commit

Permalink
fix test issue where JettyTest would fail if JettyWithResponseFilterE…
Browse files Browse the repository at this point in the history
…nabledTest 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
  • Loading branch information
TSFenwick authored Oct 18, 2021
1 parent 938c149 commit 9c15f93
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9c15f93

Please sign in to comment.