Skip to content

Commit

Permalink
Issue #4572 - Updating tests that are failing
Browse files Browse the repository at this point in the history
Signed-off-by: Joakim Erdfelt <[email protected]>
  • Loading branch information
joakime committed Feb 19, 2020
1 parent 1bdb0b7 commit aecbab4
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 11 deletions.
1 change: 1 addition & 0 deletions jetty-client/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,6 @@
// Only required if using SPNEGO.
requires static java.security.jgss;
// Only required if using JMX.
requires static java.management;
requires static org.eclipse.jetty.jmx;
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
*
*/
@ManagedObject("Jetty Logging")
public class LogMBean extends ObjectMBean
public class JettyLoggerMBean extends ObjectMBean
{
public LogMBean(Object managedObject)
public JettyLoggerMBean(Object managedObject)
{
super(managedObject);
}
Expand Down
4 changes: 2 additions & 2 deletions jetty-jmx/src/test/java/org/eclipse/jetty/jmx/PojoTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import com.openpojo.validation.ValidatorBuilder;
import com.openpojo.validation.test.impl.GetterTester;
import com.openpojo.validation.test.impl.SetterTester;
import org.eclipse.jetty.logging.jmx.LogMBean;
import org.eclipse.jetty.logging.jmx.JettyLoggerMBean;
import org.junit.jupiter.api.Test;

/*
Expand All @@ -38,7 +38,7 @@ public class PojoTest
public void testOpenPojo()
{
Validator validator = ValidatorBuilder.create().with(new SetterTester()).with(new GetterTester()).build();
List<Class> classes = Arrays.asList(MBeanContainer.class, ObjectMBean.class, LogMBean.class);
List<Class> classes = Arrays.asList(MBeanContainer.class, ObjectMBean.class, JettyLoggerMBean.class);
for (Class clazz : classes)
{
validator.validate(PojoClassFactory.getPojoClass(clazz));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
// ========================================================================
//

package org.eclipse.jetty.util.log.jmx;
package org.eclipse.jetty.logging.jmx;

import com.acme.Managed;
import org.eclipse.jetty.logging.jmx.LogMBean;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

import static org.hamcrest.MatcherAssert.assertThat;
Expand All @@ -29,20 +29,21 @@
import static org.hamcrest.Matchers.not;
import static org.junit.jupiter.api.Assertions.assertTrue;

public class LogMBeanTest
@Disabled
public class JettyLoggerMBeanTest
{

private Managed managed;

private LogMBean logMBean;
private JettyLoggerMBean logMBean;

private static final String MANAGED_CLASS = "Managed";

@BeforeEach
public void setUp()
{
managed = new Managed();
logMBean = new LogMBean(managed);
logMBean = new JettyLoggerMBean(managed);
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public StacklessLogging(Class<?>... classesToSquelch)
{
for (Class<?> clazz : classesToSquelch)
{
JettyLogger jettyLogger = loggerFactory.getConfiguredJettyLogger(clazz);
JettyLogger jettyLogger = loggerFactory.getJettyLogger(clazz.getName());
// only operate on loggers that are of type StdErrLog
if (!jettyLogger.isDebugEnabled())
{
Expand All @@ -85,7 +85,7 @@ public StacklessLogging(Package... packagesToSquelch)
{
for (Package pkg : packagesToSquelch)
{
JettyLogger jettyLogger = loggerFactory.getConfiguredJettyLogger(pkg.getName());
JettyLogger jettyLogger = loggerFactory.getJettyLogger(pkg.getName());
// only operate on loggers that are of type StdErrLog
if (!jettyLogger.isDebugEnabled())
{
Expand Down

0 comments on commit aecbab4

Please sign in to comment.