Bug 532946 - Fix SwtTestUtil#isRunningOnEclipseOrgHudsonGTK
Summary: Fix SwtTestUtil#isRunningOnEclipseOrgHudsonGTK
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.8   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 4.8 M7   Edit
Assignee: Leo Ufimtsev CLA
QA Contact:
URL:
Whiteboard:
Keywords: test, triaged
Depends on:
Blocks:
 
Reported: 2018-03-27 06:34 EDT by Lars Vogel CLA
Modified: 2018-05-08 10:26 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Vogel CLA 2018-03-27 06:34:43 EDT
SwtTestUtil#isRunningOnEclipseOrgHudsonGTK should be renamed to SwtTestUtil#isRunningOnEclipseOrgContinousIntegration. Using hudson in the name does not make sense after the migration to Jenkins.

Also I assume Jenkins uses a different user name than "hudsonbuild".
Comment 1 Lars Vogel CLA 2018-03-27 06:35:39 EDT
Leo, can you take this one as the check is from you?
Comment 2 Eclipse Genie CLA 2018-03-27 09:36:40 EDT
New Gerrit change created: https://git.eclipse.org/r/120269
Comment 3 Leo Ufimtsev CLA 2018-04-04 15:09:23 EDT
Fixed via:
https://git.eclipse.org/r/#/c/120732/
Comment 4 Dani Megert CLA 2018-04-05 10:29:51 EDT
"Org"

I guess this should be "Or"
Comment 5 Leo Ufimtsev CLA 2018-04-05 10:34:13 EDT
(In reply to Dani Megert from comment #4)
> "Org"
> 
> I guess this should be "Or"

Which Org are you refering to, the one in this name?
isRunningOnEclipseOrgContinousIntegration

You sure?

I think the "Org" is referring to eclipse.org rather than Eclipse 'Or' Continuous integration. I.e, Eclipse.Org 'is' the continuous integration.  But I'm not sure.

@Lars, wdyt?
Comment 6 Dani Megert CLA 2018-04-05 10:37:41 EDT
(In reply to Leo Ufimtsev from comment #5)
> (In reply to Dani Megert from comment #4)
> > "Org"
> > 
> > I guess this should be "Or"
> 
> Which Org are you refering to, the one in this name?
> isRunningOnEclipseOrgContinousIntegration
> 
> You sure?
> 
> I think the "Org" is referring to eclipse.org rather than Eclipse 'Or'
> Continuous integration.

Probably, but rather fishy. The code checks for the user being "genie.platform". This can also be on some other random companies server.
Comment 7 Leo Ufimtsev CLA 2018-04-05 10:39:50 EDT
(In reply to Dani Megert from comment #6)

> > isRunningOnEclipseOrgContinousIntegration

> Probably, but rather fishy. The code checks for the user being
> "genie.platform". This can also be on some other random companies server.

That's a good point.
I don't know how to tell if something runs on our Jenkins instance. Is there a better way than using 'genie.platform'?

We could rename it to just simply:
isRunningOnContinousIntegration

wdyt?
Comment 8 Dani Megert CLA 2018-04-05 10:47:31 EDT
(In reply to Leo Ufimtsev from comment #7)
> We could rename it to just simply:
> isRunningOnContinousIntegration
> 
> wdyt?

I think that's fine, plus change the Javadoc to

/** Useful if you want some tests not to run on Jenkins with user "genie.platform" */
Comment 9 Eclipse Genie CLA 2018-04-05 11:12:24 EDT
New Gerrit change created: https://git.eclipse.org/r/120785
Comment 11 Leo Ufimtsev CLA 2018-04-05 11:12:44 EDT
Done, thank you for suggestion.
Comment 12 Sravan Kumar Lakkimsetti CLA 2018-04-06 03:03:59 EDT
(In reply to Dani Megert from comment #6)
> (In reply to Leo Ufimtsev from comment #5)
> > (In reply to Dani Megert from comment #4)
> > > "Org"
> > > 
> > > I guess this should be "Or"
> > 
> > Which Org are you refering to, the one in this name?
> > isRunningOnEclipseOrgContinousIntegration
> > 
> > You sure?
> > 
> > I think the "Org" is referring to eclipse.org rather than Eclipse 'Or'
> > Continuous integration.
> 
> Probably, but rather fishy. The code checks for the user being
> "genie.platform". This can also be on some other random companies server.

The code checks for username as "genie.platform" which will never satisfy in the current configuration as we moved the linux test jobs to releng hipp(username: platform.releng).

Please note We don't have any test jobs on platform hipp now. This freed up executors for platform gerrit jobs.
Comment 13 Leo Ufimtsev CLA 2018-04-06 10:42:24 EDT
(In reply to Sravan Kumar Lakkimsetti from comment #12)
> (In reply to Dani Megert from comment #6)
> > (In reply to Leo Ufimtsev from comment #5)
> > > (In reply to Dani Megert from comment #4)
> > > > "Org"
> > > > 
> > > > I guess this should be "Or"
> > > 
> > > Which Org are you refering to, the one in this name?
> > > isRunningOnEclipseOrgContinousIntegration
> > > 
> > > You sure?
> > > 
> > > I think the "Org" is referring to eclipse.org rather than Eclipse 'Or'
> > > Continuous integration.
> > 
> > Probably, but rather fishy. The code checks for the user being
> > "genie.platform". This can also be on some other random companies server.
> 
> The code checks for username as "genie.platform" which will never satisfy in
> the current configuration as we moved the linux test jobs to releng
> hipp(username: platform.releng).
> 
> Please note We don't have any test jobs on platform hipp now. This freed up
> executors for platform gerrit jobs.

Would checking for user 'platform.releng' determine that we're running tests on the eclipse foundation?

Is there any other way that doesn't depend on user name?