Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-23491

Integration tests: CleanUpOS3 fails if no connection exists

XMLWordPrintable

      If you run CleanUpOS3 without a connection it will fail producing a test error, which it shouldnt since it's just about cleaning up after tests.
      The reason for it is that the wait for the connection item in the OpenShift explorer tree is producing a CoreLayerException, while the class is catching a JFaceLayerException:

      try {
      	 connection = explorer.getOpenShift3Connection();
      } catch (JFaceLayerException ex) {
      	// There is no connection with such username, nothing happens
      }
      

      The stack trace that is produced:

      org.jboss.reddeer.core.exception.CoreLayerException: No matching widget found with Matcher matching when all matchers match: [Matcher matching widget with the same type as or type extending class org.eclipse.swt.widgets.Tree]
      class org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer$2
      	class org.eclipse.swt.widgets.Composite
      		class org.eclipse.ui.part.PageBook
      			class org.eclipse.swt.widgets.Tree
      			class org.eclipse.ui.forms.widgets.Form with text ''
      				class org.eclipse.ui.internal.forms.widgets.FormHeading with text ''
      					class org.eclipse.ui.internal.forms.widgets.TitleRegion with text ''
      						class org.eclipse.swt.widgets.Label with text ''
      				class org.eclipse.ui.forms.widgets.LayoutComposite
      					class org.eclipse.swt.widgets.Link with text 'No connections are available. Create a new connection with the <a>New Connection Wizard...</a>'
      
      	at org.jboss.reddeer.core.lookup.WidgetLookup.activeWidget(WidgetLookup.java:108)
      	at org.jboss.reddeer.core.lookup.WidgetLookup.activeWidget(WidgetLookup.java:78)
      	at org.jboss.reddeer.swt.widgets.AbstractWidget.<init>(AbstractWidget.java:41)
      	at org.jboss.reddeer.swt.impl.tree.AbstractTree.<init>(AbstractTree.java:35)
      	at org.jboss.reddeer.swt.impl.tree.DefaultTree.<init>(DefaultTree.java:77)
      	at org.jboss.reddeer.swt.impl.tree.DefaultTree.<init>(DefaultTree.java:37)
      	at org.jboss.reddeer.swt.impl.tree.DefaultTree.<init>(DefaultTree.java:28)
      	at org.jboss.tools.openshift.reddeer.view.OpenShiftExplorerView.getConnectionItem(OpenShiftExplorerView.java:276)
      	at org.jboss.tools.openshift.reddeer.view.OpenShiftExplorerView.getOpenShift3Connection(OpenShiftExplorerView.java:267)
      	at org.jboss.tools.openshift.reddeer.view.OpenShiftExplorerView.getOpenShift3Connection(OpenShiftExplorerView.java:253)
      	at org.jboss.tools.openshift.reddeer.utils.CleanUpOS3.cleanUp(CleanUpOS3.java:43)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:483)
      	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
      	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
      	at org.jboss.reddeer.junit.internal.runner.statement.RunAfters.evaluate(RunAfters.java:76)
      	at org.jboss.reddeer.junit.internal.runner.statement.RunIAfterTestExtensions.evaluate(RunIAfterTestExtensions.java:61)
      	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
      	at org.jboss.reddeer.junit.internal.runner.RequirementsRunner.runChild(RequirementsRunner.java:175)
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
      	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
      	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
      	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
      	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
      	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
      	at org.jboss.reddeer.junit.internal.runner.statement.RunBefores.evaluate(RunBefores.java:79)
      	at org.jboss.reddeer.junit.internal.runner.statement.FulfillRequirementsStatement.evaluate(FulfillRequirementsStatement.java:45)
      	at org.jboss.reddeer.junit.internal.runner.statement.RunIBeforeClassExtensions.evaluate(RunIBeforeClassExtensions.java:72)
      	at org.jboss.reddeer.junit.internal.runner.statement.RunAfters.evaluate(RunAfters.java:68)
      	at org.jboss.reddeer.junit.internal.runner.statement.CleanUpRequirementStatement.evaluate(CleanUpRequirementStatement.java:44)
      	at org.jboss.reddeer.junit.internal.runner.statement.RunIAfterClassExtensions.evaluate(RunIAfterClassExtensions.java:59)
      	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
      	at org.jboss.reddeer.junit.internal.runner.RequirementsRunner.run(RequirementsRunner.java:156)
      	at org.junit.runners.Suite.runChild(Suite.java:128)
      	at org.junit.runners.Suite.runChild(Suite.java:27)
      	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
      	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
      	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
      	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
      	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
      	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
      	at org.junit.runners.Suite.runChild(Suite.java:128)
      	at org.junit.runners.Suite.runChild(Suite.java:27)
      	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
      	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
      	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
      	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
      	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
      	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
      	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
      	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
      	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
      	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678)
      	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
      	at org.jboss.reddeer.eclipse.core.RemotePluginTestRunner.main(RemotePluginTestRunner.java:68)
      	at org.jboss.reddeer.eclipse.core.UITestApplication.runTests(UITestApplication.java:125)
      	at org.eclipse.e4.ui.internal.workbench.swt.E4Testable$1.run(E4Testable.java:73)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: org.jboss.reddeer.common.exception.WaitTimeoutExpiredException: Timeout after: 1 s.: widget is found
      	at org.jboss.reddeer.common.wait.AbstractWait.timeoutExceeded(AbstractWait.java:183)
      	at org.jboss.reddeer.common.wait.AbstractWait.wait(AbstractWait.java:136)
      	at org.jboss.reddeer.common.wait.AbstractWait.<init>(AbstractWait.java:101)
      	at org.jboss.reddeer.common.wait.AbstractWait.<init>(AbstractWait.java:71)
      	at org.jboss.reddeer.common.wait.AbstractWait.<init>(AbstractWait.java:56)
      	at org.jboss.reddeer.common.wait.WaitUntil.<init>(WaitUntil.java:47)
      	at org.jboss.reddeer.core.lookup.WidgetLookup.activeWidget(WidgetLookup.java:103)
      	... 60 more
      
      

              adietish@redhat.com André Dietisheim
              adietish@redhat.com André Dietisheim
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: