提交 d2c44cf8 编写于 作者: J jgish

7146552: java/util/logging/LoggingMXBeanTest.java failing intermittently

Reviewed-by: alanb, mchung
上级 6b8e61fd
/*
* Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -43,6 +43,8 @@ public class LoggingMXBeanTest
ObjectName objectName = null;
static String LOGGER_NAME_1 = "com.sun.management.Logger1";
static String LOGGER_NAME_2 = "com.sun.management.Logger2";
static Logger logger1;
static Logger logger2;
public LoggingMXBeanTest() throws Exception {
......@@ -131,8 +133,8 @@ public class LoggingMXBeanTest
System.out.println( "*********** Phase 3 ***********" );
System.out.println( "*******************************" );
System.out.println( " Create and test new Loggers" );
Logger logger1 = Logger.getLogger( LOGGER_NAME_1 );
Logger logger2 = Logger.getLogger( LOGGER_NAME_2 );
logger1 = Logger.getLogger( LOGGER_NAME_1 );
logger2 = Logger.getLogger( LOGGER_NAME_2 );
// check that Level object are returned properly
try {
......
/*
* Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -42,12 +42,14 @@ public class LoggingMXBeanTest2
static String LOGGER_NAME_1 = "com.sun.management.Logger";
static String LOGGER_NAME_2 = "com.sun.management.Logger.Logger2";
static String UNKNOWN_LOGGER_NAME = "com.sun.management.Unknown";
static Logger logger1;
static Logger logger2;
public LoggingMXBeanTest2() throws Exception {
Logger logger1 = Logger.getLogger( LOGGER_NAME_1 );
logger1 = Logger.getLogger( LOGGER_NAME_1 );
logger1.setLevel(Level.FINE);
Logger logger2 = Logger.getLogger( LOGGER_NAME_2 );
logger2 = Logger.getLogger( LOGGER_NAME_2 );
logger2.setLevel(null);
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册