JENKINS-8702 unit tests improvements

hudson.UDPBroadcastThread#testMulticast hangs when the network isn't enabled on my Linux box: joinGroup throws IOException and the ready lock isn't released.
This ready lock is only used in the tests.
This commit is contained in:
Jerome Lacoste committed 2011-02-05 13:58:47 +01:00
1 parent 826d9ddb3d
commit 2e47359a6e
2 files changed
+6 -1

No files matched your search

@@ -61,10 +61,13 @@ public class UDPBroadcastThread extends Thread {
@Override
public void run() {
try {
try{
mcs.joinGroup(MULTICAST);
} finally{
ready.signal();
}
while(true) {
while(true) {
byte[] buf = new byte[2048];
DatagramPacket p = new DatagramPacket(buf,buf.length);
mcs.receive(p);