Hi,
I've also made a fresh checkout + "ant clean tests"
I got 6 failures, and 661 errors. Ugh.
All errors look the same (except JDBCUserDatabaseTest module), and appear at
setUp(), for example (apologies for the long stack traces):
MockServletContext: JSPWiki: Unable to load and setup properties from
jspwiki.properties. Failed to start; please check log files for better
information.
------------- ---------------- ---------------
Testcase: testRemove took 0,125 sec
Caused an ERROR
JSPWiki: Unable to load and setup properties from jspwiki.properties. Failed
to start; please check log files for better information.
org.apache.wiki.api.WikiException: JSPWiki: Unable to load and setup
properties from jspwiki.properties. Failed to start; please check log files
for better information.
at org.apache.wiki.WikiEngine.<init>(WikiEngine.java:447)
at org.apache.wiki.TestEngine.<init>(TestEngine.java:146)
at
org.apache.wiki.workflow.DecisionQueueTest.setUp(DecisionQueueTest.java:60)
Caused by: org.apache.wiki.api.WikiException: Failed to start; please check
log files for better information.
at org.apache.wiki.WikiEngine.initialize(WikiEngine.java:655)
at org.apache.wiki.WikiEngine.<init>(WikiEngine.java:429)
... 12 more
Caused by: org.apache.wiki.api.WikiException: Failed to invoke class
org.apache.wiki.content.ContentManager, reason:
org.apache.wiki.api.WikiException: Failed to initialize the repository
content
at org.apache.wiki.util.ClassUtil.getMappedObject(ClassUtil.java:311)
at org.apache.wiki.util.ClassUtil.getMappedObject(ClassUtil.java:204)
at org.apache.wiki.WikiEngine.initialize(WikiEngine.java:565)
... 13 more
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at org.apache.wiki.util.ClassUtil.getMappedObject(ClassUtil.java:276)
... 15 more
Caused by: org.apache.wiki.api.WikiException: Failed to initialize the
repository content
at
org.apache.wiki.content.ContentManager.<init>(ContentManager.java:305)
... 19 more
Caused by: org.priha.util.ConfigurationException: Cannot use the Priha
FileProvider repository while another instance of Priha is using it. If you
are sure there are no other instances using this same repository, please
remove the 'E:\Workspaces\JSPWiki\JSPWiki_svn\build\tests\priha\.prihalock'
file and restart.
at org.priha.providers.FileProvider.start(FileProvider.java:328)
at
org.priha.core.ProviderManager.instantiateProvider(ProviderManager.java:215)
at org.priha.core.ProviderManager.initialize(ProviderManager.java:117)
at org.priha.core.ProviderManager.<init>(ProviderManager.java:65)
at
org.priha.core.RepositoryImpl.getProviderManager(RepositoryImpl.java:117)
at org.priha.core.RepositoryImpl.login(RepositoryImpl.java:193)
at org.priha.core.RepositoryImpl.login(RepositoryImpl.java:39)
at
org.apache.wiki.content.ContentManager$JCRSessionManager.newSession(ContentManager.java:1795)
at
org.apache.wiki.content.ContentManager$JCRSessionManager.createSession(ContentManager.java:1779)
at
org.apache.wiki.content.ContentManager$JCRSessionManager.getSession(ContentManager.java:1839)
at
org.apache.wiki.content.ContentManager.initialize(ContentManager.java:318)
at
org.apache.wiki.content.ContentManager.<init>(ContentManager.java:301)
Digging around, I've found the following stack trace at VariableManagerTest,
which may explain the cause of so many errors (?):
INFO: Repository empty; setting up root node...
java.io.FileNotFoundException:
build\tests\priha\jcr:system\jcr:primaryType.data (El nombre de archivo,
directorio o etiqueta del volumen no es válido)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
at org.priha.providers.FileProvider.writeValue(FileProvider.java:574)
at
org.priha.providers.FileProvider.putPropertyValue(FileProvider.java:675)
at org.priha.core.ProviderManager.putProperty(ProviderManager.java:517)
at org.priha.core.SessionProvider.save(SessionProvider.java:427)
at org.priha.core.SessionImpl.saveNodes(SessionImpl.java:500)
at org.priha.core.SessionImpl.save(SessionImpl.java:485)
at org.priha.core.SessionImpl.repopulate(SessionImpl.java:472)
at org.priha.core.SessionImpl.<init>(SessionImpl.java:99)
at
org.priha.core.RepositoryImpl$SessionManager.openSession(RepositoryImpl.java:321)
at org.priha.core.RepositoryImpl.login(RepositoryImpl.java:195)
at org.priha.core.RepositoryImpl.login(RepositoryImpl.java:39)
at
org.apache.wiki.content.ContentManager$JCRSessionManager.newSession(ContentManager.java:1795)
at
org.apache.wiki.content.ContentManager$JCRSessionManager.createSession(ContentManager.java:1779)
at
org.apache.wiki.content.ContentManager$JCRSessionManager.getSession(ContentManager.java:1839)
at
org.apache.wiki.content.ContentManager.initialize(ContentManager.java:318)
at
org.apache.wiki.content.ContentManager.<init>(ContentManager.java:301)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at org.apache.wiki.util.ClassUtil.getMappedObject(ClassUtil.java:276)
at org.apache.wiki.util.ClassUtil.getMappedObject(ClassUtil.java:204)
at org.apache.wiki.WikiEngine.initialize(WikiEngine.java:565)
at org.apache.wiki.WikiEngine.<init>(WikiEngine.java:429)
at org.apache.wiki.TestEngine.<init>(TestEngine.java:146)
at
org.apache.wiki.VariableManagerTest.setUp(VariableManagerTest.java:64)
[...]
27-oct-2009 19:32:22 org.priha.core.RepositoryImpl <init>
INFO: G'day, Matilda! Priha 0.5.6 has been initialized.
27-oct-2009 19:32:22 org.priha.core.RepositoryImpl getProviderManager
INFO: Initializing providers...
27-oct-2009 19:32:22 org.priha.providers.FileProvider start
GRAVE: Cannot use the Priha FileProvider repository while another instance
of Priha is using it. If you are sure there are no other instances using
this same repository, please remove the
'E:\Workspaces\JSPWiki\JSPWiki_svn\build\tests\priha\.prihalock' file and
restart.
27-oct-2009 19:32:22 org.priha.core.RepositoryImpl <init>
INFO: G'day, Matilda! Priha 0.5.6 has been initialized.
27-oct-2009 19:32:22 org.priha.core.RepositoryImpl getProviderManager
which first line means invalid filename or directory (I'm running on
windows).
As for failures:
- CreoleToJSPWikiTranslatorTest:
- testBoldAcrossLineBreaks fails with following trace:
junit.framework.ComparisonFailure: expected:<...
...> but was:<......> [<-- notice expected newline]
- CommentedPropertiesTest:
- testRemove: junit.framework.AssertionFailedError: expected:<290> but
was:<288> at
org.apache.wiki.util.CommentedPropertiesTest.testRemove(CommentedPropertiesTest.java:139)
- testSetProperty: junit.framework.AssertionFailedError: expected:<376>
but was:<377> at
org.apache.wiki.util.CommentedPropertiesTest.testSetProperty(CommentedPropertiesTest.java:72)
- testSetEscapedProperty: junit.framework.ComparisonFailure:
expected:<......> but was:<...
...> [<-- notice unexpected newline here] at
org.apache.wiki.util.CommentedPropertiesTest.testSetEscapedProperty(CommentedPropertiesTest.java:86)
- testSetComment: junit.framework.AssertionFailedError at
org.apache.wiki.util.CommentedPropertiesTest.testSetComment(CommentedPropertiesTest.java:120)
As for JDBCUserDatabaseTest:
- JDBCUserDatabaseTest fails with AssertionFailedError at
org.apache.wiki.auth.user.JDBCUserDatabaseTest.testSave(JDBCUserDatabaseTest.java:450
- testRename is the only one which ends in success
- the rest are giving an error with the following message:
java.sql.SQLException:
File input/output error: jspwiki.log at
org.apache.wiki.auth.user.JDBCUserDatabaseTest.setUp(JDBCUserDatabaseTest.java:126)
Tomorrow at work I'll try on a ubuntu box to see if it makes a difference.
regards,
juan pablo
On Tue, Oct 27, 2009 at 6:16 PM, Harry Metske <[email protected]>wrote:
> I just did a fresh svn checkout, and ran "ant clean tests" from the
> cmdline.
> This gives me 3 failures and 13 errors:
> http://www.computerhok.nl/tmp/junit-noframes.html
>
> The WikiEngineTest.testSpacedNames1() always fails (Linux versus
> Mac/Windows)
>
> Here's an overview of more tests :
> http://www.computerhok.nl/tmp/jspwiki-testresult.html
>
> regards,
> Harry
>
> 2009/10/27 Andrew Jaquith <[email protected]>
>
> > Sounds like we have a few issues here:
> >
> > 1) Guitests. I'll see what I can find. Probably something minor. I
> > know the "tests" target runs all test classes ending in "*Test" and
> > ignores "AllTests", while Eclipse (and probably guitests) just runs
> > the AllTests classes. It's likely that one or more of the AllTests
> > classes is failing to include, oh, about 34 tests. :)
> >
> > 2) Graceful LDAP fail (inside the tests themselves). Any ideas on how
> > to implement? The easy way would be to look for a localhost listener
> > on 4890 (where the OpenLDAP test fixture listens) and then not run the
> > tests if it isn't found. Should they FAIL or PASS in that case? It
> > sounds like passing is the right thing to do.
> >
> > 3) Differences in your test pass rate versus mine. Not sure why your
> > "ant tests" run would produce different results than mine. I did try
> > running mine with a completely new, checked-out branch. Because I
> > can't know what changes you might have in your local branch, could you
> > check out a clean copy and diff the tree versus yours? SOMETHING is
> > different. Also, I'd like to know what Harry and others are seeing.
> > Gents, any clues?
> >
> > I agree that all three methods should return the same number of test
> > cases, and pass/fail the same ways. I also agree that tests should be
> > self-contained. That was part of the rationale for the Ant script
> > tweaks I checked in recently.
> >
> > Eclipse, by the way, hasn't been reliable for me, for testing, for a
> > while. I tend to exhaust memory somewhere around JSPWikiMarkupParser.
> > But I haven't tried it in the last few months (i.e. before my massive
> > bug-hunting campaign).
> >
> > Andrew
> >
> >
> >
> > On Tue, Oct 27, 2009 at 3:25 AM, Janne Jalkanen
> > <[email protected]> wrote:
> > >> Interestingly, I applied your most recent checkins applied (and I have
> > >> small one patch to JSPWikiMarkupParserTest that I haven't checked in).
> > >> I am running 100% clean, with no errors. Total number of tests: 1024
> > >> -- a nice round number. :) WikiEngineTest.testOldVersionVars has
> > >> been running fine for me for a while.
> > >
> > > There's no way it should've run, unless you have some old code/config
> > files
> > > lying around. Can you check out a previous version to a clean
> directory
> > and
> > > see if it runs?
> > >
> > >> As a control case, I also checked out a new built from trunk, and
> > >> simply typed 'ant tests'. I used a vanilla build with absolutely no
> > >> customizations, even to build.properties. It ran completely clean also
> > >> except for 1 JSPWikiMarkupParserTest test (because I haven't checked
> > >> in that fix), 1024 tests total.
> > >
> > > Running the AllTests from Eclipse or with "ant guitests" results in 990
> > test
> > > cases. "ant tests" is the only one giving 1024 tests, and I get 12
> > failures
> > > and 14 errors for it. LdapAuthorizerTest, LdapUserDatabaseTest and
> > > XMLUserDatabaseTest all fail with all tests.
> > >
> > > What I find odd is that guitests and tests targets should give the same
> > > results, since they both are run from build.xml.
> > >
> > >> The only other item causing the discrepancy would be if you don't have
> > >> a local LDAP server running for the LDAP tests. Those should cause, at
> > >> most, 14 failures or errors. I'll add in some code to build.xml to set
> > >> up the LDAP fixtures and/or disable the tests if the OpenLDAP
> > >> executable isn't available.
> > >
> > > I think it's probably a better idea to do the test directly in the
> tests
> > > itself. The JCR TCK throws a NonExecutableException when the test case
> > > cannot be executed (and this shows up as a passed test).
> > >
> > > I think it's important that all three methods give the same number of
> > test
> > > cases; if the number is not reliable, it's too easy to forget to run
> > certain
> > > tests.
> > >
> > > Also, I sometimes run all tests for a given package from within
> Eclipse.
> > I'd
> > > like the test cases to be self-contained enough so that I don't have to
> > > remember which tests are supposed to run under which conditions.
> > >
> > > /Janne
> > >
> >
>