Fixed a potential race condition in AbstractSocketStringEchoTest

This commit is contained in:
Trustin Lee 2008-09-04 11:29:22 +00:00
parent 486eff6378
commit 1d1e88397e

View File

@ -201,12 +201,12 @@ public abstract class AbstractSocketStringEchoTest {
String m = (String) e.getMessage();
assertEquals(data[counter], m);
counter ++;
if (channel.getParent() != null) {
String delimiter = random.nextBoolean() ? "\r\n" : "\n";
channel.write(m + delimiter);
}
counter ++;
}
@Override