tests fail on mac with java 7

77 views
Skip to first unread message

John Scancella

unread,
Jan 27, 2016, 9:35:46 AM1/27/16
to droid-list
I tried to build DROID using maven and java 7 on my mac but it is failing tests. Attached are the results and the maven output during the build.
droid-results.zip
mavenOutput.txt

Brian O'Reilly

unread,
Feb 2, 2016, 10:43:48 AM2/2/16
to droid-list
Hi John
If you get a chance can you try building using the code at:
This is intended to form the next release, which is now imminent.  We have tested here on various platforms and it has built OK.
Regards, Brian

Brian O'Reilly

unread,
Feb 2, 2016, 10:55:07 AM2/2/16
to droid-list
Also, these tests creates temporary directories (profiles and tmp) with files under droid-results - you'll need permission to create these directories and their contents.
Regards, Brian
 
On Wednesday, January 27, 2016 at 2:35:46 PM UTC, John Scancella wrote:

John Scancella

unread,
Feb 9, 2016, 8:41:11 AM2/9/16
to droid...@googlegroups.com
Sorry for getting back to you so late, work has been busy. I still get errors trying to build it using java 7 on my mac. Attached is the maven output.

--
You received this message because you are subscribed to a topic in the Google Groups "droid-list" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/droid-list/6uDZ2ljJams/unsubscribe.
To unsubscribe from this group and all its topics, send an email to droid-list+...@googlegroups.com.
To post to this group, send email to droid...@googlegroups.com.
Visit this group at https://groups.google.com/group/droid-list.
For more options, visit https://groups.google.com/d/optout.



--
~John Scancella
mavenOutput.txt

Brian O'Reilly

unread,
Feb 17, 2016, 10:04:14 AM2/17/16
to droid-list
Hi John
Your build appears to fail on the same tests as before - have you ruled out permissions issues?  Also, which Github source code location did you use last time round?  You may get more information on the failure message if you run the maven build with the -e and -X switches.
Regards, Brian

John Scancella

unread,
Feb 18, 2016, 7:27:15 AM2/18/16
to droid...@googlegroups.com
It shouldn't be permission issues since I am running this locally on my machine and have full root. As for which Github source, I took your suggestion and switched to g...@github.com:snail1966/droid.git

Brian O'Reilly

unread,
Mar 1, 2016, 10:09:03 AM3/1/16
to droid-list
Hi John
Sorry for the delay in getting back to you. We've tried building on a Mac OS X installation here and it builds fine. (Java 8 in this case, though I doubt that would make a difference).  This does seem to point to an issue with your OS X configuration.  Do you particularly need to build from the source code - or would the compiled binaries suffice for your purpose?  Also, you may be able to build by disabling the tests e.g. mvn clean install -Dmaven.test.skip=true.  Hope this helps.
Regards, Brian


On Thursday, February 18, 2016 at 12:27:15 PM UTC, John Scancella wrote:
It shouldn't be permission issues since I am running this locally on my machine and have full root. As for which Github source, I took your suggestion and switched to g...@github.com:snail1966/droid.git
On Wed, Feb 17, 2016 at 10:04 AM, Brian O'Reilly  wrote:
Hi John
Your build appears to fail on the same tests as before - have you ruled out permissions issues?  Also, which Github source code location did you use last time round?  You may get more information on the failure message if you run the maven build with the -e and -X switches.
Regards, Brian

On Tuesday, February 9, 2016 at 1:41:11 PM UTC, John Scancella wrote:
Sorry for getting back to you so late, work has been busy. I still get errors trying to build it using java 7 on my mac. Attached is the maven output.

On Tue, Feb 2, 2016 at 10:55 AM, Brian O'Reilly wrote:
Also, these tests creates temporary directories (profiles and tmp) with files under droid-results - you'll need permission to create these directories and their contents.
Regards, Brian
 
On Wednesday, January 27, 2016 at 2:35:46 PM UTC, John Scancella wrote:
I tried to build DROID using maven and java 7 on my mac but it is failing tests. Attached are the results and the maven output during the build.

--
You received this message because you are subscribed to a topic in the Google Groups "droid-list" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/droid-list/6uDZ2ljJams/unsubscribe.
To unsubscribe from this group and all its topics, send an email to droid-list+...@googlegroups.com.
To post to this group, send email to droid...@googlegroups.com.
Visit this group at https://groups.google.com/group/droid-list.
For more options, visit https://groups.google.com/d/optout.



--
~John Scancella

--
You received this message because you are subscribed to a topic in the Google Groups "droid-list" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/droid-list/6uDZ2ljJams/unsubscribe.
To unsubscribe from this group and all its topics, send an email to droid-list+...@googlegroups.com.
To post to this group, send email to droid...@googlegroups.com.
Visit this group at https://groups.google.com/group/droid-list.
For more options, visit https://groups.google.com/d/optout.



--
~John Scancella

John Scancella

unread,
Mar 1, 2016, 10:12:40 AM3/1/16
to droid...@googlegroups.com
Hi Brian,

That is interesting, I do lots of java development so I wouldn't think my setup is special.
No I don't need to build from source, I was just following the instructions.

Thanks
John

ross-spencer

unread,
Mar 1, 2016, 6:39:57 PM3/1/16
to droid-list
Hi John,

I don't see anywhere in this thread where the specific tests have been isolated and referenced, from what I can see in the log, they are the following:

Running uk.gov.nationalarchives.droid.profile.ProfileSpecToXmlPersistenceTest
2016-02-09 08:23:36,088  INFO [main] ProfileInstance:304 - Attempting state change [INITIALISING] to [STOPPED]
2016-02-09 08:23:36,091  INFO [pool-3-thread-1] ProfileInstance:304 - Attempting state change [RUNNING] to [FINISHED]
2016-02-09 08:23:36,289  INFO [main] ProfileInstance:304 - Attempting state change [INITIALISING] to [STOPPED]
2016-02-09 08:23:36,353  INFO [main] ProfileInstance:304 - Attempting state change [INITIALISING] to [STOPPED]
Tests run: 4, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 0.305 sec <<< FAILURE!

I have commented on the GitHub in the past that I (no an independent working with DROID) have also had issues building - in some cases due to regional differences, in others check style was failing. 

First, within the code if you can find the specific test class: https://github.com/digital-preservation/droid/blob/1288e5b084ccb853d1efc779aecb3d279d2989cd/droid-results/src/test/java/uk/gov/nationalarchives/droid/profile/ProfileSpecToXmlPersistenceTest.java 

As you do lots of Java development, I only write this for the benefit of others but can put an @ignore tag at the top of the tests there. This is at least better than skipping all tests across the project. 

Second, looking at the code, I can see that there are a few places where the tests in that class are trying to write to the file system. Perhaps there are some permission issues there worth checking. 

A suggestion is just to see if you can download the binary for DROID as a test and try to run the GUI - specifically once loaded - try and identify some files. A common issue is not being able to access the .droid six folder within your user directory. On Linux this is just /home/{user}/.droid6 - if this doesn't work you'll see the 'profile initializing' bar continue to work away - a sure sign there are permissions issues somewhere! 

And so, if you can't write there it might be a clue as to why these two tests are failing. 

If not then square one! ;)  - As other tests are passing then I do have my doubts this will be the cause, but just to offer something constructive. 

I'll be interested to know. I've been monitoring the thread with great interest. 

Cheers,

Ross

Brian O'Reilly

unread,
Mar 2, 2016, 6:03:30 AM3/2/16
to droid-list
Hi John
Further to Ross's post above - I did raise the possibility of permissions issues earlier - you mentioned you were runing as full root which makes this unlikely though would not necessarily rule it out completely.  I don't know the latest Mac OS X in detail but it may be possible to use Activity Monitor or another tool to determine if there's an issue creating the offending folders during the tests.  Also, loading the source in an IDE and running the failing tests there may provide more iinformation.
 
If you don't specifically need to build from source then you can download the binaries from http://www.nationalarchives.gov.uk/information-management/manage-information/preserving-digital-records/droid/ .  However, we expect to release an updated version in the next few days that fixes a few minor issues with this release.
Regards, Brian
 

On Wednesday, January 27, 2016 at 2:35:46 PM UTC, John Scancella wrote:

John Scancella

unread,
Mar 2, 2016, 7:41:49 AM3/2/16
to droid...@googlegroups.com
@Ross,

When I originally sent the bug report I included the test results (I called it droid-results.zip). Looking through that the original test that was failing was ProfileSpecToXmlPersistenceTest.java testSaveProfileSpecWithSomeResources. Specifically it was failing on line 222 which is where it is comparing a diff? Below is the code:
221         Diff diff = new Diff(new StringReader(control), test);
222         assertTrue(diff.similar()); //This is where it is failing
 
I did a git checkout and git clean and now it builds correctly so perhaps it was something left over from the first test. In any case downloading the prebuilt binary solved my case (I wanted to play around with it for verifying creating a PDF/A compliant file).

Thanks for all the help everyone.

--
You received this message because you are subscribed to a topic in the Google Groups "droid-list" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/droid-list/6uDZ2ljJams/unsubscribe.
To unsubscribe from this group and all its topics, send an email to droid-list+...@googlegroups.com.
To post to this group, send email to droid...@googlegroups.com.
Visit this group at https://groups.google.com/group/droid-list.
For more options, visit https://groups.google.com/d/optout.



--
~John Scancella

ross-spencer

unread,
Mar 2, 2016, 3:46:46 PM3/2/16
to droid-list
Hi John,

Thanks for the information, it was just the specific test I couldn't work out - probably my fault. 

I reported a bug in the same test on December 6: https://github.com/digital-preservation/droid/issues/80 

I can see if git build and git clean help with my issue.

Glad you could get on with your other testing! 

Cheers,

Ross
Reply all
Reply to author
Forward
0 new messages