[YANGIDE-11] (Re)enable non-UI tests for build and proposed Gerrit changes Created: 09/May/16  Updated: 26/Oct/17

Status: Open
Project: yangide
Component/s: General
Affects Version/s: unspecified
Fix Version/s: None

Type: Improvement
Reporter: Michael Vorburger Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issue Links:
Blocks
blocks YANGIDE-12 (Re)enable UI (!) tests for build and... Resolved
Duplicate
is duplicated by YANGIDE-12 (Re)enable UI (!) tests for build and... Resolved

 Description   

I just noticed that the yangide source tree actually includes x4 test projects, but as of today none of them are currently not run during its build and for proposed Gerrit changes. Having tests but not running them seems a shame! (Perhaps something like YANGIDE-10 would even have been detected by this?)

This bug is to discuss what it would take in particular the existing tests in org.opendaylight.yangide.core.tests and org.opendaylight.yangide.m2e.yang.tests for build and proposed Gerrit changes. (I'll create a separate new bug for two other test bundles which I found.)

I can see that these are commented out in the <modules> of the root pom.xml, but I don't really understand why .. do they not run (anymore?) - need help to get them green?

Or were they perhaps commented out fearing that they will not run on a build server due to UI dependencies? As far as I saw, these two actually do NOT contain UI tests, so should be fine.



 Comments   
Comment by Michael Vorburger [ 09/May/16 ]

> I'll create a separate new bug for two other test bundles which I found

YANGIDE-12 created specifically for UI related tests (this one just for non-UI).

Comment by Michael Vorburger [ 09/May/16 ]

> these are commented out in the <modules> of the root pom.xml

BTW: This has the curious side effect that in a https://github.com/vorburger/opendaylight-eclipse-setup provision workspace, or even when one does a manual Import Existing Maven Projects from the yangide root directory, then org.opendaylight.yangide.core.tests and org.opendaylight.yangide.m2e.yang.tests do not get imported. It appears that M2E appears to be (IMHO too..) smart and "filters" out projects which are not in <modules>.

Comment by Michael Vorburger [ 09/May/16 ]

https://git.opendaylight.org/gerrit/#/c/38586/ raised for this, and:

Locally it passed just fine (without opening any UI related pop-ups), see:

Running org.opendaylight.yangide.m2e.yang.tests.YangGenerationTest
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
TEST-SETUP: test_p001_simple
[I] Project: yang-p001
[I] simple-string-demo@2013-06-18 - simple-string-demo - MODULE
[I] simple-string-demo@2013-06-18 - typedef-string - TYPE
[IR] QName [module=simple-string-demo, prefix=sbd, name=string, revision=2013-06-18] : TYPE_REF - yang-p001@/yang-p001/src/main/yang/simple-string-demo.yang
[I] Project: yang-p001
[x] L/yang-p001/src/main/yang/simple-string-demo.yang
[I] Project: yang-p001
[x] L/yang-p001/src/main/yang/simple-string-demo.yang
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 186.97 sec - in org.opendaylight.yangide.m2e.yang.tests.YangGenerationTest
test_p001_simple(org.opendaylight.yangide.m2e.yang.tests.YangGenerationTest) Time elapsed: 181.035 sec

[INFO] org.opendaylight.yangide.m2e.yang.tests ............ SUCCESS [03:22 min]
[INFO] org.opendaylight.yangide.core.tests ................ SUCCESS [ 21.185 s]

That YangGenerationTest does seem slow though at 3 minutes.

On https://jenkins.opendaylight.org/releng/job/yangide-verify-boron/jdk=openjdk8,nodes=dynamic_verify/31/console this failed with:

org.eclipse.swt.SWTError: No more handles [gtk_init_check() failed]
at org.eclipse.swt.SWT.error(SWT.java:4517)
at org.eclipse.swt.widgets.Display.createDisplay(Display.java:908)
at org.eclipse.swt.widgets.Display.create(Display.java:892)
at org.eclipse.swt.graphics.Device.<init>(Device.java:156)
at org.eclipse.swt.widgets.Display.<init>(Display.java:512)
at org.eclipse.swt.widgets.Display.<init>(Display.java:503)
at org.eclipse.swt.widgets.Display.getDefault(Display.java:1704)
at org.eclipse.jface.preference.PreferenceConverter.<clinit>(PreferenceConverter.java:81)
at org.opendaylight.yangide.ui.internal.preferences.YangUIPreferenceInitializer.initializeDefaultPreferences(YangUIPreferenceInitializer.java:37)
at org.eclipse.core.internal.preferences.PreferenceServiceRegistryHelper$1.run(PreferenceServiceRegistryHelper.java:300)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.preferences.PreferenceServiceRegistryHelper.runInitializer(PreferenceServiceRegistryHelper.java:303)
at org.eclipse.core.internal.preferences.PreferenceServiceRegistryHelper.applyRuntimeDefaults(PreferenceServiceRegistryHelper.java:131)
at org.eclipse.core.internal.preferences.PreferencesService.applyRuntimeDefaults(PreferencesService.java:368)
at org.eclipse.core.internal.preferences.DefaultPreferences.applyRuntimeDefaults(DefaultPreferences.java:221)
at org.eclipse.core.internal.preferences.DefaultPreferences.load(DefaultPreferences.java:274)
at org.eclipse.core.internal.preferences.EclipsePreferences.create(EclipsePreferences.java:409)
at org.eclipse.core.internal.preferences.EclipsePreferences.internalNode(EclipsePreferences.java:670)
at org.eclipse.core.internal.preferences.EclipsePreferences.node(EclipsePreferences.java:812)
at org.eclipse.core.internal.preferences.AbstractScope.getNode(AbstractScope.java:38)
at org.eclipse.core.runtime.preferences.DefaultScope.getNode(DefaultScope.java:76)
at org.eclipse.ui.preferences.ScopedPreferenceStore.getDefaultPreferences(ScopedPreferenceStore.java:238)
at org.eclipse.ui.preferences.ScopedPreferenceStore.getPreferenceNodes(ScopedPreferenceStore.java:269)
at org.eclipse.ui.preferences.ScopedPreferenceStore.internalGet(ScopedPreferenceStore.java:419)
at org.eclipse.ui.preferences.ScopedPreferenceStore.getBoolean(ScopedPreferenceStore.java:359)
at org.opendaylight.yangide.m2e.yang.YangBuildParticipant.build(YangBuildParticipant.java:83)
at org.eclipse.m2e.core.internal.builder.MavenBuilderImpl.build(MavenBuilderImpl.java:137)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$1.method(MavenBuilder.java:172)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$1.method(MavenBuilder.java:1)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod$1$1.call(MavenBuilder.java:115)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:176)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:112)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod$1.call(MavenBuilder.java:105)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:176)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:99)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.execute(MavenBuilder.java:86)
at org.eclipse.m2e.core.internal.builder.MavenBuilder.build(MavenBuilder.java:200)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:734)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:205)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:245)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:300)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:303)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:262)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:402)
at org.eclipse.core.internal.resources.Project$1.run(Project.java:556)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2241)
at org.eclipse.core.internal.resources.Project.internalBuild(Project.java:534)
at org.eclipse.core.internal.resources.Project.build(Project.java:111)
at org.opendaylight.yangide.m2e.yang.tests.YangGenerationTest.test_p001_simple(YangGenerationTest.java:32)

So this "non-UI" test behind still requires a UI (because of a YangUIPreferenceInitializer from org.opendaylight.yangide.org.opendaylight.yangide.ui.

Because you would need to have at least a "virtual" UI anyway for YANGIDE-12 I would suggest that as per https://documentation.cloudbees.com/docs/dev-at-cloud/CI_Testing_GUI_Applications.html this could be addressed by using https://wiki.jenkins-ci.org/display/JENKINS/Xvfb+Plugin or https://wiki.jenkins-ci.org/display/JENKINS/Xvnc+Plugin on jenkins.opendaylight.org. How do we get that configured?

Comment by David M. Karr [ 09/May/16 ]

Getting the tests fully working (reliably) will be a project in itself. I commented out those modules in the POM because I often saw them failing in the command line build, even when they would succeed running interactively in Eclipse.

I've already informally broached the subject of running automated UI tests with Thanh and Andy (Grimberg). I had more important things to get working.

Comment by Michael Vorburger [ 10/May/16 ]

Next step: Waiting for reply to helpdesk@opendaylight.org helpdesk ticket #22870, and/or https://lists.opendaylight.org/pipermail/dev/2016-May/001999.html ..

Comment by Michael Vorburger [ 02/Jun/16 ]

Helpdesk meanwhile gave me access to Jenkins sandbox. Email below clarifies what needs to be done next.

Assigning to myself to indicate that I'm hoping to eventually get to this, but likely only during July and not June. If anyone gets to this earlier, please do and update status here.

---------- Forwarded message ----------
From: Thanh Ha via RT <helpdesk@opendaylight.org>
Date: Wed, May 11, 2016 at 1:49 AM
Subject: opendaylight.org #22870 Fwd: [opendaylight-dev] How to get new Jenkins plugins for "virtual" X11 for UI testing installed?
To: vorburger@redhat.com

On Mon May 09 15:15:23 2016, vorburger@redhat.com wrote:
> > What do I have to do to get, as per
> > https://documentation.cloudbees.com/docs/dev-at-
> > cloud/CI_Testing_GUI_Applications.html,
> > either https://wiki.jenkins-ci.org/display/JENKINS/Xvfb+Plugin or
> > https://wiki.jenkins-ci.org/display/JENKINS/Xvnc+Plugin installed on
> > jenkins.opendaylight.org and activated on the yangide build jobs?

I installed both plugins in the sandbox and will entrust you to test and recommend to us which one we should deploy to production. They both appear to be supported by JJB which is a good thing:

http://docs.openstack.org/infra/jenkins-job-builder/wrappers.html

If you find there are features that you cannot configure with JJB and need support for it. Feel free to post on the dev mailing list with the [releng] topic. We have an intern this summer who is working on JJB who can implement any missing functionality if necessary.

> > This would be useful for
> > https://bugs.opendaylight.org/show_bug.cgi?id=5864, needed to get
> > https://git.opendaylight.org/gerrit/#/c/38586/ to pass.
> >
> > I'm willing to help, but do not seem to have the require permissions
> > to
> > install new plugins on Jenkins and change the configuration of plans.
> > So
> > I'm assuming there's someone else who would do this for me?

That's great, please keep us in the loop on your findings. Our systems build using dynamically allocated build slaves so you may find that additional dependencies might be needed to be installed on the slave systems. Our CI Jenkins page which I linked to you today should have details on the different slave types and you can find the vagrant definitions for those slaves in the releng/builder repo under the "vagrant" directory. Unfortunately updates to these files currently require helpdesk to respin the images and we're in the middle of transitioning to the private cloud so there might be some blocking issues here if you need vagrants updated until the private cloud migration is complete.

Thanks,
Thanh

Comment by Michael Vorburger [ 26/Oct/17 ]

Un-assigning issues I'll never work on... (I've no interest in yangide anymore.)

Generated at Wed Feb 07 20:48:26 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.