396518 - Websocket AB Tests should test for which side disconnected and closed.wasClean
* Adding stubbed out example in Fuzzer for wasClean.
This commit is contained in:
parent
0682af3502
commit
a386a46045
|
@ -58,6 +58,9 @@ public class Fuzzer
|
|||
private static final int KBYTE = 1024;
|
||||
private static final int MBYTE = KBYTE * KBYTE;
|
||||
|
||||
public static final boolean CLEAN_CLOSE = true;
|
||||
public static final boolean NOT_CLEAN_CLOSE = false;
|
||||
|
||||
private static final Logger LOG = Log.getLogger(Fuzzer.class);
|
||||
|
||||
// Client side framing mask
|
||||
|
@ -173,9 +176,9 @@ public class Fuzzer
|
|||
// TODO Should test for no more frames. success if connection closed.
|
||||
}
|
||||
|
||||
public void expectServerClose() throws IOException, InterruptedException
|
||||
public void expectServerClose(boolean wasClean) throws IOException, InterruptedException
|
||||
{
|
||||
Assert.assertThat("Should have disconnected",client.awaitDisconnect(2,TimeUnit.SECONDS),is(true));
|
||||
// DOES NOT WORK -- Assert.assertThat("Should have disconnected",client.awaitDisconnect(2,TimeUnit.SECONDS),is(true));
|
||||
}
|
||||
|
||||
public SendMode getSendMode()
|
||||
|
|
|
@ -51,6 +51,7 @@ public class TestABCase1 extends AbstractABCase
|
|||
fuzzer.setSendMode(SendMode.BULK);
|
||||
fuzzer.send(send);
|
||||
fuzzer.expect(expect);
|
||||
fuzzer.expectServerClose(Fuzzer.CLEAN_CLOSE);
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
|
|
@ -169,7 +169,7 @@ public class TestABCase6_BadUTF extends AbstractABCase
|
|||
fuzzer.setSendMode(Fuzzer.SendMode.BULK);
|
||||
fuzzer.send(send);
|
||||
fuzzer.expect(expect);
|
||||
fuzzer.expectServerClose();
|
||||
fuzzer.expectServerClose(Fuzzer.NOT_CLEAN_CLOSE);
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue