DependencyGrabberTest fails on Windows during build

22 views
Skip to first unread message

Vivek Krishnan

unread,
Sep 28, 2016, 6:48:55 PM9/28/16
to Gremlin-users
Currently, my local builds seem to fail during the DependencyGrabberTest, even though I have made no modification to the source. Looking at the specific test, I noticed that the extClassPath (the file object passed to the dependencygrabber) has a path that looked something like this:

    "C:\workspace\tinkerpop_SNAPSHOP_2.3.2\gremlin-groovy\C:\workspace\tinkerpop_SNAPSHOP_2.3.2\gremlin-groovy\target\test-case-data\DependencyGrabberTest\tinkergraph-gremlin"

As you can see, there seems to be two c:\ in the given path which throws an IOerror in windows.


(I see that the DependencyGrabberTest was made an integration test in Tinkerpop-1477, does this mean this bug would be fixed in the latest commit?)

Stephen Mallette

unread,
Sep 28, 2016, 7:49:43 PM9/28/16
to Gremlin-users
well - it is "fixed" in the sense that it won't fail on a standard unit test run (for example, mvn clean install), but i sense that if you ran integration tests with -DskipIntegrationTests=false it might still fail on windows. If you have a pull request that can make that test platform agnostic, that would be awesome.

--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/8114c113-9b72-4f51-b38c-86e9fc69bb9c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Vivek Krishnan

unread,
Oct 3, 2016, 7:56:20 PM10/3/16
to Gremlin-users
So looking at some of the errors with the Dependency Grabber Test on Windows:

One fix I tried was to replace:
//private static final File extTestDir = new File(System.getProperty("user.dir"), TestHelper.makeTestDataDirectory(DependencyGrabberTest.class));
private static final File extTestDir = new File(TestHelper.makeTestDataDirectory(DependencyGrabberTest.class));
Because on Windows, the original extTestDir was of the for  C:\workspace\tinkerpop_SNAPSHOP_2.3.2\gremlin-groovy\target\test-case-data\DependencyGrabberTest\C:\workspace\tinkerpop_SNAPSHOP_2.3.2\gremlin-groovy\target\test-case-data\DependencyGrabberTest\tinkergraph-gremlin, which it failed to navigate to. However, it seemed to be able to find the new path I included.

Once I replaced this, I found that the deleteDir function for deleteDependencies failed. At this point, I am guessing that this is a permissions issue so I will try to look into that.

On Wednesday, September 28, 2016 at 4:49:43 PM UTC-7, Stephen Mallette wrote:
well - it is "fixed" in the sense that it won't fail on a standard unit test run (for example, mvn clean install), but i sense that if you ran integration tests with -DskipIntegrationTests=false it might still fail on windows. If you have a pull request that can make that test platform agnostic, that would be awesome.
On Wed, Sep 28, 2016 at 6:48 PM, Vivek Krishnan <vee...@gmail.com> wrote:
Currently, my local builds seem to fail during the DependencyGrabberTest, even though I have made no modification to the source. Looking at the specific test, I noticed that the extClassPath (the file object passed to the dependencygrabber) has a path that looked something like this:

    "C:\workspace\tinkerpop_SNAPSHOP_2.3.2\gremlin-groovy\C:\workspace\tinkerpop_SNAPSHOP_2.3.2\gremlin-groovy\target\test-case-data\DependencyGrabberTest\tinkergraph-gremlin"

As you can see, there seems to be two c:\ in the given path which throws an IOerror in windows.


(I see that the DependencyGrabberTest was made an integration test in Tinkerpop-1477, does this mean this bug would be fixed in the latest commit?)

--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.

Paul Jackson

unread,
Oct 10, 2016, 12:45:11 PM10/10/16
to Gremlin-users
What is this line of code trying to do?
private static final File extTestDir = new File(System.getProperty("user.dir"), TestHelper.makeTestDataDirectory(DependencyGrabberTest.class));

My interpretation is that the user.dir property is to contain a parent path where all test directories are to do and makeTestDataDirectory is to return a single folder to be used for containing data for a single test (based on the meanings of the arguments of the File constructor). However, makeTestDataDirectory is a method that returns a complete path, in which Windows includes a drive letter that's illegal as part of a folder name. It think it is a mistake to create a new path by prepending the user.dir location after makeTestDataDirectory has done all its work. If you want to include a base directory I think it should be passed to makeTestDataDirectory as an optional argument.

After removing the user.dir support, on windows it still fails to clean up. It's because the JarFile objects are not being closed. I'll try to submit a pull request for both of these. It will be my first to this project in a few years so please give constructive feedback if I screw something up!


On Wednesday, September 28, 2016 at 7:49:43 PM UTC-4, Stephen Mallette wrote:
well - it is "fixed" in the sense that it won't fail on a standard unit test run (for example, mvn clean install), but i sense that if you ran integration tests with -DskipIntegrationTests=false it might still fail on windows. If you have a pull request that can make that test platform agnostic, that would be awesome.
On Wed, Sep 28, 2016 at 6:48 PM, Vivek Krishnan <vee...@gmail.com> wrote:
Currently, my local builds seem to fail during the DependencyGrabberTest, even though I have made no modification to the source. Looking at the specific test, I noticed that the extClassPath (the file object passed to the dependencygrabber) has a path that looked something like this:

    "C:\workspace\tinkerpop_SNAPSHOP_2.3.2\gremlin-groovy\C:\workspace\tinkerpop_SNAPSHOP_2.3.2\gremlin-groovy\target\test-case-data\DependencyGrabberTest\tinkergraph-gremlin"

As you can see, there seems to be two c:\ in the given path which throws an IOerror in windows.


(I see that the DependencyGrabberTest was made an integration test in Tinkerpop-1477, does this mean this bug would be fixed in the latest commit?)

--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.

Paul Jackson

unread,
Oct 10, 2016, 1:05:01 PM10/10/16
to Gremlin-users

Stephen Mallette

unread,
Oct 11, 2016, 6:49:22 AM10/11/16
to Gremlin-users
I don't see that pattern for temporary test file creation being used anywhere else. Not sure what the origin of that is, but if you can make it run on both windows and other OS, then I think it's safe to change.I see that Jason has already commented positively on the JIRA ticket that was opened. I'll let him drive it from there.

To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/810724a0-0b62-402e-ae8c-162e74be5d49%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages