Author: lfryc(a)redhat.com
Date: 2010-09-13 08:19:55 -0400 (Mon, 13 Sep 2010)
New Revision: 19170
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jQueue/TestFormQueue.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jQueue/TestGlobalQueue.java
Log:
added JavaDoc to a4j:queue tests (RFPL-733)
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jQueue/TestFormQueue.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jQueue/TestFormQueue.java 2010-09-13
12:11:08 UTC (rev 19169)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jQueue/TestFormQueue.java 2010-09-13
12:19:55 UTC (rev 19170)
@@ -63,6 +63,19 @@
return buildUrl(contextPath,
"faces/components/a4jQueue/formQueue.xhtml");
}
+ /**
+ * <p>
+ * Tests request delays for one form queue.
+ * </p>
+ *
+ * <p>
+ * Uses one form queue, which controls events from two distinct event sources.
+ * </p>
+ * <p>
+ * When one source waits for delay and another source produces event, events from
first source should be immediately
+ * processed.
+ * </p>
+ */
@Test
public void testTimingOneQueueTwoEvents() {
formQueueA.attributes.setRequestDelay(DELAY_A);
@@ -83,6 +96,19 @@
checkTimes(formQueueA, Event.SECOND, DELAY_A);
}
+ /**
+ * <p>
+ * Tests the event handlers producing count of events (count of events, requests and
updates).
+ *
+ * <p>
+ * Uses one form queue, which controls events from two distinct event sources.
+ * </p>
+ *
+ * <p>
+ * When one source waits for delay and another source produces event, events from
first source should be immediately
+ * processed.
+ * </p>
+ */
@Test
public void testCountsOneQueueTwoEvents() {
formQueueA.attributes.setRequestDelay(DELAY_A);
@@ -107,6 +133,20 @@
checkCounts(formQueueA, 2, 3, 2, 2);
}
+ /**
+ * <p>
+ * Tests request delays for two form queues.
+ * </p>
+ *
+ * <p>
+ * Uses two form queues, controlling events from four distinct event sources (two for
each queue).
+ * </p>
+ *
+ * <p>
+ * When one source waits for delay and another source produces event, events from
first source should be immediately
+ * processed.
+ * </p>
+ */
@Test
public void testTimingTwoQueuesFourEvents() {
formQueueA.attributes.setRequestDelay(DELAY_A);
@@ -139,6 +179,19 @@
assertTrue(formQueueB.retrieveBeginTime.retrieve() -
formQueueB.retrieveEvent1Time.retrieve() > 3000);
}
+ /**
+ * <p>
+ * Tests the event handlers producing count of events (count of events, requests and
updates).
+ *
+ * <p>
+ * Uses two form queues, controlling events from four distinct event sources (two for
each queue).
+ * </p>
+ *
+ * <p>
+ * When one source waits for delay and another source produces event, events from
first source should be immediately
+ * processed.
+ * </p>
+ */
@Test
public void testCountsTwoQueuesThreeEvents() {
formQueueA.attributes.setRequestDelay(DELAY_A);
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jQueue/TestGlobalQueue.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jQueue/TestGlobalQueue.java 2010-09-13
12:11:08 UTC (rev 19169)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jQueue/TestGlobalQueue.java 2010-09-13
12:19:55 UTC (rev 19170)
@@ -59,6 +59,9 @@
return buildUrl(contextPath,
"faces/components/a4jQueue/globalQueue.xhtml");
}
+ /**
+ * Tests delay between time last event occurs and time when event triggers request
(begin).
+ */
@Test
@Use(field = "requestDelay", ints = { 0, 500, 1500, 5000 })
public void testRequestDelay() {
@@ -72,6 +75,9 @@
checkAvgDeviation();
}
+ /**
+ * Events from one source should be stacked as occurs, while last event isn't
delayed by configured requestDelay.
+ */
@Test
public void testMultipleRequestsWithDelay() {
attributes.setRequestDelay(3000);
@@ -97,6 +103,15 @@
XHRHalter.disable();
}
+ /**
+ * <p>
+ * When no requestDelay (0) is set, events should fire request immediately.
+ * </p>
+ *
+ * <p>
+ * However, when one event is waiting in queue for processing of previous request,
events should be stacked.
+ * </p>
+ */
@Test
public void testMultipleRequestsWithNoDelay() {
attributes.setRequestDelay(0);
Show replies by date