Skip to content

Commit

Permalink
[JENKINS-11762] Changes to add a configurable display name to jobs
Browse files Browse the repository at this point in the history
Originally-Committed-As: 484d952029b235d889a5d2e4bd9bc44a9707f7ff
  • Loading branch information
Albert So authored and kohsuke committed Jan 3, 2012
1 parent a28b80a commit 69c6395
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions test/src/main/java/org/jvnet/hudson/test/HudsonTestCase.java
@@ -1,7 +1,7 @@
/*
* The MIT License
*
* Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Erik Ramfelt,
* Copyright (c) 2004-2011, Sun Microsystems, Inc., Kohsuke Kawaguchi, Erik Ramfelt,
* Yahoo! Inc., Tom Huybrechts, Olivier Lamy
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down Expand Up @@ -354,11 +354,13 @@ protected void tearDown() throws Exception {
}
clients.clear();

for (Channel c : channels)
c.close();
for (Channel c : channels)
c.join();
channels.clear();
synchronized(channels) {
for (Channel c : channels)
c.close();
for (Channel c : channels)
c.join();
channels.clear();
}

} finally {
server.stop();
Expand Down Expand Up @@ -497,11 +499,16 @@ public static class ComputerListenerImpl extends ComputerListener {
public void onOnline(Computer c, TaskListener listener) throws IOException, InterruptedException {
VirtualChannel ch = c.getChannel();
if (ch instanceof Channel)
TestEnvironment.get().testCase.channels.add((Channel)ch);
TestEnvironment.get().testCase.addChannel((Channel)ch);
}
}


private void addChannel(Channel ch) {
synchronized (channels) {
channels.add(ch);
}
}

// /**
// * Sets guest credentials to access java.net Subversion repo.
// */
Expand Down

0 comments on commit 69c6395

Please sign in to comment.