Fwd: [GitHub] Ant Path matching fails on Windows [hudson/gerrit-trigger-plugin GH-1]

5 views
Skip to first unread message

Erik Ramfelt

unread,
Dec 23, 2010, 4:37:34 AM12/23/10
to hudso...@googlegroups.com
Should the GIT tracker be disabled so we dont have several issue
trackers for Hudson core and plugins?


//Erik

---------- Forwarded message ----------
From: GitHub <nor...@github.com>
Date: Thu, Dec 23, 2010 at 01:27
Subject: [GitHub] Ant Path matching fails on Windows
[hudson/gerrit-trigger-plugin GH-1]
To: eram...@gmail.com


joshbeitelspacher reported an issue:

On Windows I get the following test failures:

<pre>
-------------------------------------------------------------------------------
Test set: com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProjectInterestingTest
-------------------------------------------------------------------------------
Tests run: 6, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 0.031
sec <<< FAILURE!
testInteresting[2](com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProjectInterestingTest)
 Time elapsed: 0 sec  <<< FAILURE!
java.lang.AssertionError: expected:<true> but was:<false>
       at org.junit.Assert.fail(Assert.java:91)
       at org.junit.Assert.failNotEquals(Assert.java:645)
       at org.junit.Assert.assertEquals(Assert.java:126)
       at org.junit.Assert.assertEquals(Assert.java:145)
       at com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProjectInterestingTest.testInteresting(GerritProjectInterestingTest.java:57)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
       at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
       at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
       at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
       at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
       at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
       at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
       at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
       at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
       at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
       at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
       at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
       at org.junit.runners.Suite.runChild(Suite.java:128)
       at org.junit.runners.Suite.runChild(Suite.java:24)
       at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
       at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
       at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
       at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
       at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
       at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
       at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
       at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
       at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
       at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
       at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)

testInteresting[3](com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProjectInterestingTest)
 Time elapsed: 0 sec  <<< FAILURE!
java.lang.AssertionError: expected:<true> but was:<false>
       at org.junit.Assert.fail(Assert.java:91)
       at org.junit.Assert.failNotEquals(Assert.java:645)
       at org.junit.Assert.assertEquals(Assert.java:126)
       at org.junit.Assert.assertEquals(Assert.java:145)
       at com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProjectInterestingTest.testInteresting(GerritProjectInterestingTest.java:57)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
       at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
       at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
       at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
       at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
       at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
       at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
       at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
       at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
       at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
       at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
       at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
       at org.junit.runners.Suite.runChild(Suite.java:128)
       at org.junit.runners.Suite.runChild(Suite.java:24)
       at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
       at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
       at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
       at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
       at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
       at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
       at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
       at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
       at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
       at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
       at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
</pre>

When Ant pattern matching is used the Ant SelectorUtil class is used
to determine if there is a match, and the behavior of SelectorUtil
depends on the value of java.io.File.separator.

Replacing '/' with java.io.File.separatorChar before calling
SelectorUtil fixes the issue, but I'm not sure its the best solution.

View Issue: https://github.com/hudson/gerrit-trigger-plugin/issues#issue/1

Josh Beitelspacher

unread,
Dec 23, 2010, 2:42:10 PM12/23/10
to Hudson Developers
I'm happy to migrate the issue to JIRA if desired, but I'll wait until
there is a resolution on this thread.

I probably should have written the issue in JIRA in the first place.
The plugin maintainer is doing a good job keeping up with JIRA issues,
and I don't want to make him change his workflow.

Thanks,
Josh

On Dec 23, 3:37 am, Erik Ramfelt <eramf...@gmail.com> wrote:
> Should the GIT tracker be disabled so we dont have several issue
> trackers for Hudson core and plugins?
>
> //Erik
>
> ---------- Forwarded message ----------
> From: GitHub <nore...@github.com>
> Date: Thu, Dec 23, 2010 at 01:27
> Subject: [GitHub] Ant Path matching fails on Windows
>
> [hudson/gerrit-trigger-plugin GH-1]
> To: eramf...@gmail.com

Sandell, Robert

unread,
Dec 28, 2010, 10:36:06 AM12/28/10
to hudso...@googlegroups.com
How nice of you to think of me :)

I prefer if it is just in JIRA, it is very hard to track fixes if they come from multiple report-sources.
I honestly thought that I had reported this issue in JIRA already, because I found it a very long time ago, but I apparently missed to do so.

If it is possible to turn off the issue reporting in GitHub or just add some kind of note on the issue reporting page; that would be great.

BR
Robert Sandell
@Team Hudson - Sony Ericsson

> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(Sure
> fireBooter.java:345)
> >        at
> org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.jav
> a:1009)
> >
> >
> testInteresting[3](com.sonyericsson.hudson.plugins.gerrit.trigger.hudso
> ntrigger.data.GerritProjectInterestingTest)

> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(Sure
> fireBooter.java:345)
> >        at
> org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.jav

Josh Beitelspacher

unread,
Dec 30, 2010, 1:33:27 AM12/30/10
to hudso...@googlegroups.com
Because the 'fix' here was so simple I just committed it and closed
the issue on github.

In addition to disabling the issue reporting in github it would be
beneficial to define a preferred method for submitting code changes.
Github provides a lot of options, and plugin maintainers might have
preferences:

1.) Ask for commit access and make changes directly on master.
2.) Ask for commit access and make changes on topic branches.
3.) Fork on github and submit pull requests.
4.) Attach patches to JIRA/github issues.

Gerrit would be really helpful here.

Reply all
Reply to author
Forward
0 new messages