You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@jena.apache.org by GitBox <gi...@apache.org> on 2020/03/27 10:17:20 UTC
[GitHub] [jena] rvesse commented on a change in pull request #718:
JENA-1871: Check and limit the interval for ActionSleep.
rvesse commented on a change in pull request #718: JENA-1871: Check and limit the interval for ActionSleep.
URL: https://github.com/apache/jena/pull/718#discussion_r399159481
##########
File path: jena-fuseki2/jena-fuseki-webapp/src/test/java/org/apache/jena/fuseki/TestAdmin.java
##########
@@ -278,7 +278,29 @@
deleteDataset(dsTest);
}
- // Sync task testing
+ @Test public void sleep_1() {
+ String x = execSleepTask(null, 1);
+ }
+
+ @Test public void sleep_2() {
+ try {
+ String x = execSleepTask(null, -1);
+ fail("Sleep call unexpectedly succeed");
+ } catch (HttpException ex) {
+ assertEquals(400, ex.getStatusCode());
+ }
+ }
+
+ @Test public void sleep_3() {
+ try {
+ String x = execSleepTask(null, 20*1000+1);
Review comment:
Would be nicer if this just referred to the constant in `ActionSleep` so if we ever change that the test doesn't break
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org