Skip to content
Snippets Groups Projects
Commit 9260782b authored by tmortagne's avatar tmortagne
Browse files

[misc] Bulletproofing test

parent 6358c1ff
No related branches found
No related tags found
No related merge requests found
...@@ -63,7 +63,7 @@ public void setUp() ...@@ -63,7 +63,7 @@ public void setUp()
} }
@Test @Test
public void testConvertXMLURL() throws IOException public void testConvertXMLURL() throws IOException, InterruptedException
{ {
URL url = getClass().getResource("/xml/document1.xml"); URL url = getClass().getResource("/xml/document1.xml");
...@@ -84,6 +84,10 @@ public void testConvertXMLURL() throws IOException ...@@ -84,6 +84,10 @@ public void testConvertXMLURL() throws IOException
WebElement submit = getDriver().findElement(By.name("convert")); WebElement submit = getDriver().findElement(By.name("convert"));
submit.click(); submit.click();
// Give some time to finish the conversion
// TODO: use a cleaner way to find if the conversion is done
Thread.sleep(30000);
Assert.assertEquals(IOUtils.toString(getClass().getResource("/xml/document1.xml")), Assert.assertEquals(IOUtils.toString(getClass().getResource("/xml/document1.xml")),
FileUtils.readFileToString(tmp)); FileUtils.readFileToString(tmp));
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment