Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • 24-refactoring-of-waitfornode
  • 27-spring-boot-restserver-with-module-info
  • 43-refactoring
  • android
  • eclipse-che
  • enable-preview-14
  • issue-14-rest-api
  • issue-20-settings
  • issue-8-flere-todo-lister
  • issue-9-frister-lister-og-elementer
  • master
  • 2d49359
  • d270623
13 results

Target

Select target project
  • iaholm/todo-list
  • eikhr/todo-list
  • juliada/todo-list
  • gabrioh/todo-list
  • annikeqs/todo-list
  • lauritko/todo-list
  • matskva/todo-list
  • annelold/todo-list
  • olehbak/todo-list
  • edvardbj/todo-list
  • matsel/todo-list
  • eivindoy/todo-list
  • maxg/todo-list
  • sebasv/todo-list
  • sakariks/todo-list
  • asfurnes/todo-list
  • thomaset/todo-list
  • it1901/todo-list
18 results
Select Git revision
  • 24-refactoring-of-waitfornode
  • 27-spring-boot-restserver-with-module-info
  • 43-refactoring
  • android
  • eclipse-che
  • enable-preview-14
  • issue-14-rest-api
  • issue-20-settings
  • issue-8-flere-todo-lister
  • issue-9-frister-lister-og-elementer
  • master
  • 2d49359
  • d270623
13 results
Show changes
Commits on Source (2)
...@@ -6,6 +6,7 @@ import java.util.Iterator; ...@@ -6,6 +6,7 @@ import java.util.Iterator;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException; import java.util.concurrent.TimeoutException;
import java.util.function.Predicate; import java.util.function.Predicate;
import static java.time.Duration.ofSeconds;
import javafx.fxml.FXMLLoader; import javafx.fxml.FXMLLoader;
import javafx.scene.Node; import javafx.scene.Node;
import javafx.scene.Parent; import javafx.scene.Parent;
...@@ -14,13 +15,13 @@ import javafx.scene.control.ListView; ...@@ -14,13 +15,13 @@ import javafx.scene.control.ListView;
import javafx.stage.Stage; import javafx.stage.Stage;
import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assertions.assertTimeoutPreemptively;
import static org.junit.jupiter.api.Assertions.fail; import static org.junit.jupiter.api.Assertions.fail;
import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledIfEnvironmentVariable; import org.junit.jupiter.api.condition.DisabledIfEnvironmentVariable;
import org.junit.jupiter.api.condition.DisabledIfSystemProperty;
import org.testfx.framework.junit5.ApplicationTest; import org.testfx.framework.junit5.ApplicationTest;
import org.testfx.util.WaitForAsyncUtils; import org.testfx.util.WaitForAsyncUtils;
import todolist.core.AbstractTodoList; import todolist.core.AbstractTodoList;
...@@ -157,8 +158,9 @@ public class TodoListControllerTest extends ApplicationTest { ...@@ -157,8 +158,9 @@ public class TodoListControllerTest extends ApplicationTest {
private Node waitForNode(Predicate<Node> nodeTest, int num) { private Node waitForNode(Predicate<Node> nodeTest, int num) {
WaitForAsyncUtils.waitForFxEvents(); WaitForAsyncUtils.waitForFxEvents();
Node[] nodes = new Node[1]; Node[] nodes = new Node[1];
try { boolean nodeFound;
WaitForAsyncUtils.waitFor(2000, TimeUnit.MILLISECONDS,
nodeFound = assertTimeoutPreemptively(ofSeconds(2),
() -> { () -> {
while (true) { while (true) {
if ((nodes[0] = findNode(nodeTest, num)) != null) { if ((nodes[0] = findNode(nodeTest, num)) != null) {
...@@ -166,11 +168,9 @@ public class TodoListControllerTest extends ApplicationTest { ...@@ -166,11 +168,9 @@ public class TodoListControllerTest extends ApplicationTest {
} }
Thread.sleep(100); Thread.sleep(100);
} }
} },
"No appropriate node available"
); );
} catch (TimeoutException e) {
fail("No appropriate node available");
}
return nodes[0]; return nodes[0];
} }
......