Details
-
Bug
-
Resolution: Fixed
-
Medium
-
None
-
None
Description
See for example: https://bamboo.extranet.atlassian.com/browse/JST-JST-JOB1-71/test/case/186621214
junit.framework.AssertionFailedError: Expected text not found in current page: [The quick brown fox jumps over the lazy dog] Page content was: [[#COMNOTQWUS-1] Issue Summary - jWebTest JIRA installation Joe Test Administrator Update Status... Personal Space Profile Administration Log Out History Loading... Name of COMNOTQWUS Test View All Projects Issues Wiki Source Reviews Builds Dashboards Access more options (Alt+Shift+d) Issues Access more options (Alt+Shift+i) Agile Access more options Planning Board Task Board Chart Board Released Board Tempo Access more options Timesheet Worklogs Report About Tempo Administer project Quick Search Search Create new issue Keyboard Shortcuts Selected Project Name of COMNOTQWUS Name of COMNOTQWUS COMNOTQWUS-1 Issue Summary Edit - COMNOTQWUS-1Edit Assign Comment Log Work More ActionsMore Planning Board Task Board Log Work Attach Files Attach Screenshot Add Gliffy Diagram Voters Watch Issue Watchers Move Clone Labels Delete Start Progress Resolve Issue WorkflowMore Close Issue Views XML Word Printable Details Type: Bug Status: Open Priority: Major Resolution: Unresolved Affects Version/s: None Fix Version/s: None Component/s: None Labels: None Labels Activity All Comments Work Log History Activity Stream Transitions Source Reviews Builds There are no comments yet on this issue. Comment preview wiki markup help All Users Viewable by All Users Add Cancel Comment People Assignee: Joe Test Administrator Reporter: Joe Test Administrator Vote (0) Watch (0) Dates Created: Today 4:41 AM Updated: Today 4:41 AM Powered by JIRA Studio 104 | Terms of Use | Bug/feature request | Request Support | Help/Documentation | JIRA Studio Blog | Twitter @JIRAStudio] junit.framework.AssertionFailedError: Expected text not found in current page: [The quick brown fox jumps over the lazy dog] Page content was: [[#COMNOTQWUS-1] Issue Summary - jWebTest JIRA installation Joe Test Administrator Update Status... Personal Space Profile Administration Log Out History Loading... Name of COMNOTQWUS Test View All Projects Issues Wiki Source Reviews Builds Dashboards Access more options (Alt+Shift+d) Issues Access more options (Alt+Shift+i) Agile Access more options Planning Board Task Board Chart Board Released Board Tempo Access more options Timesheet Worklogs Report About Tempo Administer project Quick Search Search Create new issue Keyboard Shortcuts Selected Project Name of COMNOTQWUS Name of COMNOTQWUS COMNOTQWUS-1 Issue Summary Edit - COMNOTQWUS-1Edit Assign Comment Log Work More ActionsMore Planning Board Task Board Log Work Attach Files Attach Screenshot Add Gliffy Diagram Voters Watch Issue Watchers Move Clone Labels Delete Start Progress Resolve Issue WorkflowMore Close Issue Views XML Word Printable Details Type: Bug Status: Open Priority: Major Resolution: Unresolved Affects Version/s: None Fix Version/s: None Component/s: None Labels: None Labels Activity All Comments Work Log History Activity Stream Transitions Source Reviews Builds There are no comments yet on this issue. Comment preview wiki markup help All Users Viewable by All Users Add Cancel Comment People Assignee: Joe Test Administrator Reporter: Joe Test Administrator Vote (0) Watch (0) Dates Created: Today 4:41 AM Updated: Today 4:41 AM Powered by JIRA Studio 104 | Terms of Use | Bug/feature request | Request Support | Help/Documentation | JIRA Studio Blog | Twitter @JIRAStudio] at junit.framework.Assert.fail(Assert.java:47) at net.sourceforge.jwebunit.junit.WebTester.assertTextPresent(WebTester.java:442) at com.atlassian.studio.livetest.PrintingPageWebTester.assertTextPresent(PrintingPageWebTester.java:144) at com.atlassian.studio.functest.tests.group1.TestCommitNotifications.testComment(TestCommitNotifications.java:63)
The problem is that the test contains a race condition:
private void commitChange(final User user, final String commitMessage) throws Exception { WebTesterUtils.setApplication(webTester, Application.FISHEYE); SvnUtils.commitFiles(user.getUserName(), user.getPassword(), projectName, commitMessage, new SvnSetup(StudioFuncTest.getInstance()).getUrl(), "Test" + System.currentTimeMillis() + ".java"); new FisheyeSetup(StudioFuncTest.getInstance()).scanRepository(projectName); // Wait 1 second for the scan to complete and for the commit notifications to be processed on // JIRA Thread.sleep(1000); WebTesterUtils.setApplication(webTester, Application.JIRA); }
Sleeping for a second doesn't guarantee that the scan actually completed.