Skip to content

Instantly share code, notes, and snippets.

@jhuska
Created September 16, 2014 11:37
Show Gist options
  • Save jhuska/84cf87b184f749d43bd7 to your computer and use it in GitHub Desktop.
Save jhuska/84cf87b184f749d43bd7 to your computer and use it in GitHub Desktop.
lalala tralala
@Test
@RegressionTest("https://issues.jboss.org/browse/RFPL-1194")
public void testMultipleRequestsWithNoDelay() {
attributes.set(QueueAttributes.requestDelay, 0);
AjaxHalter.enable();
queue.fireEvent(1);
queue.checkCounts(1, 1, 0);
AjaxHalter handle = AjaxHalter.getHandleBlocking();
handle.send();
queue.fireEvent(1);
queue.checkCounts(2, 1, 0);
handle.complete();
queue.checkCounts(2, 2, 1);
handle = AjaxHalter.getHandleBlocking();
handle.send();
queue.fireEvent(4);
queue.checkCounts(6, 2, 1);
handle.complete();
queue.checkCounts(6, 3, 2);
handle = AjaxHalter.getHandleBlocking();
handle.send();
queue.fireEvent(1);
queue.checkCounts(7, 3, 2);
handle.complete();
queue.checkCounts(7, 4, 3);
handle = AjaxHalter.getHandleBlocking();
handle.send();
queue.checkCounts(7, 4, 3);
handle.complete();
queue.checkCounts(7, 4, 4);
AjaxHalter.disable();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment