[jbosstools-issues] [JBoss JIRA] (JBIDE-13973) Test failures in Kepler >= M6

Mickael Istria (JIRA) jira-events at lists.jboss.org
Thu Apr 11 12:43:55 EDT 2013


    [ https://issues.jboss.org/browse/JBIDE-13973?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12766561#comment-12766561 ] 

Mickael Istria commented on JBIDE-13973:
----------------------------------------

[~snjeza] I've gone through the Eclipse bug and you PR and I have a few questions:
# is it still necessary to set plugin_customization.ini when -Dorg.eclipse.ui.testsDisableWorkbenchAutoSave=true is set?
# It seems to me, while reading bugs at Eclipse.org, that the issue is not the workbench save job, but rather how JobUtils is implemented. As far as I understand, JobUtils is waiting for the job list to be empty, but it appears a valid implementation to have a recurring job that is scheduled in the future. That's how the workspace save job is implemented, and I'm afraid there can be some other jobs implemented that way. So I would be in favor of fixing this in JobUtils rather than using more prerequisites on the test configuration.
                
> Test failures in Kepler >= M6 
> ------------------------------
>
>                 Key: JBIDE-13973
>                 URL: https://issues.jboss.org/browse/JBIDE-13973
>             Project: Tools (JBoss Tools)
>          Issue Type: Feature Request
>          Components: testing-tools
>    Affects Versions: 4.1.0.Alpha2
>            Reporter: Snjezana Peco
>            Assignee: Snjezana Peco
>
> 1) Kepler M6 introduces the Workspace Save Job job. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=2369 and https://bugs.eclipse.org/bugs/show_bug.cgi?id=402912
> It would be good to add a preference that would disable this job when running tests. This would speed up all the tests lasting more than five minutes. The 402912 bug is fixed, but the tests will still be faster if this job doesn't run at all.
> We would also avoid the "Long running tasks detected: Workbench Auto-Save Job" failure.
> The latest hibernate/server failures are mainly caused by this issue.
> See 
> https://jenkins.mw.lab.eng.bos.redhat.com/hudson/view/JBossTools/view/JBossTools_Trunk/job/jbosstools-server_master/256/testReport/junit/org.jboss.ide.eclipse.archives.test.model/ModelTruezipBridgeTest/testFlattenedFileset/
> https://jenkins.mw.lab.eng.bos.redhat.com/hudson/view/JBossTools/view/JBossTools_4.1.kepler/job/jbosstools-hibernate_41/42/testReport/junit.framework/TestSuite/org_jboss_tools_hibernate_jpt_core_test_HibernateJpaModelTests/
> The issue can be fixed as follows:
> a) add an option to the parent pom:
> {code}
> --- a/parent/pom.xml
> +++ b/parent/pom.xml
> @@ -227,6 +227,7 @@
>                                         <!-- THE FOLLOWING LINE MUST NOT BE BROKEN BY AUTOFORMATTING -->
>                                         <!-- tycho.testArgLine repeated to keep jacoco configuration for jacoco-maven-plugin -->
>                                         <argLine>${tycho.testArgLine} ${memoryOptions1} ${memoryOptions2} ${applejdkProperties} ${platformSystemProper
> +                                       <appArgLine>-pluginCustomization ${basedir}/plugin_customization.ini</appArgLine>
> {code}
> b) add the plugin_customization.ini file to the test's root folder with the following content:
> {code}
> org.eclipse.ui.workbench/WORKBENCH_SAVE_INTERVAL=0
> {code}
> The test plugin will be also able to change other preferences.
> It is also possible to generate this file automatically, but, that way, all the test plugins would have the same preferences. 
> I propose to add this file to all the test plugins that take more than a half hour.
> c) set the WORKBENCH_SAVE_INTERVAL property explicitly to the start method of the org.jboss.tools.tests plugin to fix periodic the "Long running tasks detected: Workbench Auto-Save Job" failures.
> {code}
> --- a/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/tests/TestsPlugin.java
> +++ b/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/tests/TestsPlugin.java
> @@ -10,7 +10,11 @@
>   ******************************************************************************/
>  package org.jboss.tools.tests;
>  
> +import org.eclipse.ui.internal.IPreferenceConstants;
> +import org.eclipse.ui.internal.WorkbenchPlugin;
> +import org.eclipse.ui.internal.util.PrefUtil;
>  import org.eclipse.ui.plugin.AbstractUIPlugin;
> +import org.osgi.framework.BundleContext;
>  
>  /**
>   * @author eskimo
> @@ -27,4 +31,10 @@ public class TestsPlugin extends AbstractUIPlugin {
>  		
>  	}
>  
> +	@Override
> +	public void start(BundleContext context) throws Exception {
> +		super.start(context);
> +		WorkbenchPlugin.getDefault().getPreferenceStore().setValue(IPreferenceConstants.WORKBENCH_SAVE_INTERVAL, 0);
> +		PrefUtil.savePrefs();
> +	}
>  }
> {code}
> 2) The following error sometimes happens:
> {code}
> org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException)
> 	at org.eclipse.swt.SWT.error(SWT.java:4392)
> 	at org.eclipse.swt.SWT.error(SWT.java:4307)
> 	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:138)
> 	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3692)
> 	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3341)
> 	at org.jboss.tools.test.util.JobUtils.delay(JobUtils.java:58)
> 	at org.jboss.tools.test.util.JobUtils.waitForIdle(JobUtils.java:37)
> 	at org.jboss.tools.test.util.JobUtils.waitForIdle(JobUtils.java:31)
> 	at org.jboss.tools.test.util.JobUtils.waitForIdle(JobUtils.java:27)
> 	...
> {code}
> 	
> See https://jenkins.mw.lab.eng.bos.redhat.com/hudson/view/JBossTools/view/JBossTools_4.1.kepler/job/jbosstools-jst_41/lastCompletedBuild/testReport/org.jboss.tools.test.util/ProjectImportTestSetup/Palette_content/
> 	
> This can be fixed as follows:
> {code}
> --- a/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/test/util/JobUtils.java
> +++ b/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/test/util/JobUtils.java
> @@ -55,7 +55,7 @@ public class JobUtils {
>  		if(PlatformUI.isWorkbenchRunning() && display!= null) {
>  			long endTimeMillis = System.currentTimeMillis() + waitTimeMillis;
>  			while (System.currentTimeMillis() < endTimeMillis) {
> -				if (!display.readAndDispatch())
> +				if (PlatformUI.isWorkbenchRunning() && display != null && !display.readAndDispatch())
>  					display.sleep();
>  			}
>  			display.update();
> {code}
> I suppose this error is also caused by the changes in the Kepler M6 UISynchronizer.
> 3) The org.jboss.ide.eclipse.archives.test.core.ant.SimpleAntTest.testOne test sometimes fails
> I think, it is necessary to add an empty file to the /org.jboss.ide.eclipse.archives.test/inputs/projects/SimpleAntTest/output directory because git skips empty directories.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jbosstools-issues mailing list