--- old/test/sun/security/krb5/auto/KDC.java 2015-04-21 17:32:31.236409099 +0300 +++ new/test/sun/security/krb5/auto/KDC.java 2015-04-21 17:32:31.040409100 +0300 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2015, 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 @@ -149,6 +149,9 @@ private List conf = new ArrayList<>(); private Thread thread1, thread2, thread3; + private volatile boolean udpConcumerReady = false; + private volatile boolean tcpConcumerReady = false; + private volatile boolean dispatcherReady = false; DatagramSocket u1 = null; ServerSocket t1 = null; @@ -1228,6 +1231,7 @@ // The UDP consumer thread1 = new Thread() { public void run() { + udpConcumerReady = true; while (true) { try { byte[] inbuf = new byte[8192]; @@ -1248,6 +1252,7 @@ // The TCP consumer thread2 = new Thread() { public void run() { + tcpConcumerReady = true; while (true) { try { Socket socket = tcp.accept(); @@ -1270,6 +1275,7 @@ // The dispatcher thread3 = new Thread() { public void run() { + dispatcherReady = true; while (true) { try { q.take().send(); @@ -1282,6 +1288,10 @@ thread3.start(); } + boolean isReady() { + return udpConcumerReady && tcpConcumerReady && dispatcherReady; + } + public void terminate() { try { thread1.stop();