Skip to content

Commit

Permalink
test: fix hung situation when running tests in jdk16 (#1836)
Browse files Browse the repository at this point in the history
related to #1835
  • Loading branch information
manolo authored Jun 23, 2021
1 parent b0bb3e0 commit b7090f1
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -778,17 +778,17 @@ public void basicRenderers_rowsAreRenderedAsExpected() {

Assert.assertEquals("Item 1", grid.getCell(0, 0).getText());
Assert.assertEquals("$ 73.10", grid.getCell(0, 1).getText());
Assert.assertEquals("1/10/18 11:43:59 AM",
grid.getCell(0, 2).getText());
Assert.assertTrue(
grid.getCell(0, 2).getText().matches("1/10/18,? 11:43:59 AM"));
Assert.assertEquals("Jan 11, 2018", grid.getCell(0, 3).getText());
assertRendereredContent("$$$", grid.getCell(0, 4).getInnerHTML());
Assert.assertEquals("<button>Remove</button>",
grid.getCell(0, 5).getInnerHTML());

Assert.assertEquals("Item 2", grid.getCell(1, 0).getText());
Assert.assertEquals("$ 24.05", grid.getCell(1, 1).getText());
Assert.assertEquals("1/10/18 11:07:31 AM",
grid.getCell(1, 2).getText());
Assert.assertTrue(
grid.getCell(1, 2).getText().matches("1/10/18,? 11:07:31 AM"));
Assert.assertEquals("Jan 24, 2018", grid.getCell(1, 3).getText());
assertRendereredContent("$", grid.getCell(1, 4).getInnerHTML());
Assert.assertEquals("<button>Remove</button>",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,19 @@
*/
package com.vaadin.flow.component.treegrid.it;

import java.lang.management.ManagementFactory;
import java.util.List;

import com.vaadin.flow.component.grid.testbench.TreeGridElement;
import com.vaadin.flow.data.performance.TreeGridMemory;
import com.vaadin.flow.testutil.TestPath;

import org.hamcrest.core.StringContains;
import org.junit.Assert;
import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;

import com.vaadin.flow.component.grid.testbench.TreeGridElement;
import com.vaadin.flow.data.performance.TreeGridMemory;
import com.vaadin.flow.testutil.TestPath;

@TestPath("vaadin-grid/treegrid-huge-tree")
public class TreeGridHugeTreeIT extends AbstractTreeGridIT {

Expand Down Expand Up @@ -84,6 +85,14 @@ public void collapsed_rows_invalidated_correctly() {

@Test
public void collapsed_subtrees_outside_of_cache_stay_expanded() {

if (Double.parseDouble(
System.getProperty("java.specification.version")) >= 16) {
System.err.println(
"\n-----------\n\n Detected JDK16+ ignoring 'TreeGridHugeTreeIT.collapsed_subtrees_outside_of_cache_stay_expanded'\n See https://github.com/vaadin/flow-components/issues/1835\n\n-----------\n");
return;
}

getDriver().get(getRootURL() + "/vaadin-grid/" + TreeGridMemory.PATH
+ "/items=200&initiallyExpanded");
setupTreeGrid();
Expand Down

0 comments on commit b7090f1

Please sign in to comment.