提交 88e3c153 编写于 作者: J Jesse Glick

Make functional tests a little quieter so we can focus on test output rather...

Make functional tests a little quieter so we can focus on test output rather than boilerplate logging.
上级 fb5c899e
......@@ -227,7 +227,7 @@ public final class TcpSlaveAgentListener extends Thread {
AgentProtocol p = AgentProtocol.of(protocol);
if (p!=null) {
if (Jenkins.getInstance().getAgentProtocols().contains(protocol)) {
LOGGER.log(Level.INFO, "Accepted {0} connection #{1} from {2}", new Object[] {protocol, id, this.s.getRemoteSocketAddress()});
LOGGER.log(p instanceof PingAgentProtocol ? Level.FINE : Level.INFO, "Accepted {0} connection #{1} from {2}", new Object[] {protocol, id, this.s.getRemoteSocketAddress()});
p.handle(this.s);
} else {
error(out, "Disabled protocol:" + s);
......
......@@ -3313,7 +3313,7 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
public void onAttained(Milestone milestone) {
Level lv = level;
String s = "Attained " + milestone.toString();
if (milestone instanceof TermMilestone) {
if (milestone instanceof TermMilestone && !Main.isUnitTest) {
lv = Level.INFO; // noteworthy milestones --- at least while we debug problems further
s = milestone.toString();
}
......@@ -3337,7 +3337,7 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
}
private Set<Future<?>> _cleanUpDisconnectComputers(final List<Throwable> errors) {
LOGGER.log(Level.INFO, "Starting node disconnection");
LOGGER.log(Main.isUnitTest ? Level.FINE : Level.INFO, "Starting node disconnection");
final Set<Future<?>> pending = new HashSet<Future<?>>();
// JENKINS-28840 we know we will be interrupting all the Computers so get the Queue lock once for all
Queue.withLock(new Runnable() {
......@@ -3498,7 +3498,7 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
private void _cleanUpShutdownPluginManager(List<Throwable> errors) {
if(pluginManager!=null) {// be defensive. there could be some ugly timing related issues
LOGGER.log(Level.INFO, "Stopping plugin manager");
LOGGER.log(Main.isUnitTest ? Level.FINE : Level.INFO, "Stopping plugin manager");
try {
pluginManager.stop();
} catch (OutOfMemoryError e) {
......@@ -3519,7 +3519,7 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
if(getRootDir().exists()) {
// if we are aborting because we failed to create JENKINS_HOME,
// don't try to save. Issue #536
LOGGER.log(Level.INFO, "Persisting build queue");
LOGGER.log(Main.isUnitTest ? Level.FINE : Level.INFO, "Persisting build queue");
try {
getQueue().save();
} catch (OutOfMemoryError e) {
......@@ -3558,7 +3558,7 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
private void _cleanUpAwaitDisconnects(List<Throwable> errors, Set<Future<?>> pending) {
if (!pending.isEmpty()) {
LOGGER.log(Level.INFO, "Waiting for node disconnection completion");
LOGGER.log(Main.isUnitTest ? Level.FINE : Level.INFO, "Waiting for node disconnection completion");
}
for (Future<?> f : pending) {
try {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册