portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Watler <wat...@wispertel.net>
Subject Re: Building js2 with tests?
Date Mon, 21 Dec 2009 14:46:25 GMT
All,

TestDatabasePageManagerCache will probably not work correctly with Derby 
since it is a clustered multi-process server test. I will disable it for 
Derby and other in-process databases.

Randy

Ate Douma wrote:
> Hi David,
>
>
> David Jencks wrote:
>> So, after a lot of problems including finding that having jetspeed 
>> 2.2-SNAPSHOT artifacts in my local repo causes the db init to fail, I 
>> got the tests to run here.
> I don't understand what you mean by having jetspeed artifacts in your 
> local repo causes the db init to fail.
> Can you elaborate?
>
>>
>> I find 3 test failures, at least one of which goes away when the 
>> module is run by itself:
>>
>>  find . -name *Test*.txt |xargs grep FAILURE
>> ./components/jetspeed-page-manager/target/surefire-reports/org.apache.jetspeed.page.cache.TestDatabasePageManagerCache.txt:Tests

>> run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 4.617 sec 
>> <<< FAILURE!
>> ./components/jetspeed-page-manager/target/surefire-reports/org.apache.jetspeed.page.cache.TestDatabasePageManagerCache.txt:testDatabasePageManagerCache(org.apache.jetspeed.page.cache.TestDatabasePageManagerCache)
 
>> Time elapsed: 4.614 sec  <<< FAILURE!
>> ./components/jetspeed-portal/target/surefire-reports/org.apache.jetspeed.tools.pamanager.TestPortletApplicationManager.txt:Tests

>> run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 3.992 sec 
>> <<< FAILURE!
>> ./components/jetspeed-portal/target/surefire-reports/org.apache.jetspeed.tools.pamanager.TestPortletApplicationManager.txt:testPortletApplicationManager(org.apache.jetspeed.tools.pamanager.TestPortletApplicationManager)
 
>> Time elapsed: 3.987 sec  <<< FAILURE!
>> ./components/jetspeed-security/target/surefire-reports/org.apache.jetspeed.security.TestRdbmsPolicyFolder.txt:Tests

>> run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 3.54 sec 
>> <<< FAILURE!
>
> I just did a clean update to the latest trunk revision (892796) and 
> executed the following from the src root:
> $cp jetspeed-mvn-settings-sample.xml jetspeed-mvn-settings.xml
> $mvn clean install
> $mvn -o jetspeed:mvn -Dtarget=test-install
>
> This also failed on me with an error on TestDatabasePageManagerCache, 
> but not the TestPortletApplicationManager:
>
> $find . -name *Test*.txt |xargs grep FAILURE
> ./components/jetspeed-page-manager/target/surefire-reports/org.apache.jetspeed.page.cache.TestDatabasePageManagerCache.txt:Tests

> run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 3.987 sec 
> <<< FAILURE!
> ./components/jetspeed-page-manager/target/surefire-reports/org.apache.jetspeed.page.cache.TestDatabasePageManagerCache.txt:testDatabasePageManagerCache(org.apache.jetspeed.page.cache.TestDatabasePageManagerCache)

>  Time elapsed: 3.89 sec  <<< FAILURE!
>
> When I run the same again but modify the jetspeed-mvn-settings.xml to 
> use a PostgreSQL (8.3) database, all tests are successful.
>
> We'll look into the TestDatabasePageManagerCache issue shortly.
>
> For the time being, could you try to test again with either a 
> PostgreSQL or MySQL database?
>
> As reference, my PostgreSQL test settings are as follows (you'll need 
> to setup a schema for a j2t user of course):
>
>   
> <org.apache.jetspeed.test.database.default.name>postgresql</org.apache.jetspeed.test.database.default.name>

>
>   
> <org.apache.jetspeed.test.jdbc.driver.groupId>postgresql</org.apache.jetspeed.test.jdbc.driver.groupId>

>
>   
> <org.apache.jetspeed.test.jdbc.driver.artifactId>postgresql</org.apache.jetspeed.test.jdbc.driver.artifactId>

>
>   
> <org.apache.jetspeed.test.jdbc.driver.version>8.3-603.jdbc3</org.apache.jetspeed.test.jdbc.driver.version>

>
>   
> <org.apache.jetspeed.test.database.driver>org.postgresql.Driver</org.apache.jetspeed.test.database.driver>

>
>   
> <org.apache.jetspeed.test.database.url>jdbc:postgresql://localhost/pg</org.apache.jetspeed.test.database.url>

>
>   
> <org.apache.jetspeed.test.database.user>j2t</org.apache.jetspeed.test.database.user>

>
>   
> <org.apache.jetspeed.test.database.password>j2t</org.apache.jetspeed.test.database.password>

>
>
> For MySQL something like the following should work:
>
>   
> <org.apache.jetspeed.production.database.default.name>mysql</org.apache.jetspeed.production.database.default.name>

>
>   
> <org.apache.jetspeed.production.jdbc.driver.groupId>mysql</org.apache.jetspeed.production.jdbc.driver.groupId>

>
>   
> <org.apache.jetspeed.production.jdbc.driver.artifactId>mysql-connector-java</org.apache.jetspeed.production.jdbc.driver.artifactId>

>
>   
> <org.apache.jetspeed.production.jdbc.driver.version>5.1.6</org.apache.jetspeed.production.jdbc.driver.version>

>
>   
> <org.apache.jetspeed.production.database.driver>com.mysql.jdbc.Driver</org.apache.jetspeed.production.database.driver>

>
>   <org.apache.jetspeed.production.database.url>
>     
> <![CDATA[jdbc:mysql://127.0.0.1/jetspeed?useServerPrepStmts=false&amp;jdbcCompliantTruncation=false]]>

>
>   </org.apache.jetspeed.production.database.url>
>   
> <org.apache.jetspeed.production.database.user>j2t</org.apache.jetspeed.production.database.user>

>
>   
> <org.apache.jetspeed.production.database.password>j2t</org.apache.jetspeed.production.database.password>

>
>
>>
>>
>> I get the same errors with normal pluto and my locally patched pluto 
>> with fairly extensive DI changes.
>>
>>
>> Is this a good enough compatibility test that I can go ahead and 
>> commit my pluto changes without disrupting jetspeed too much?
> If you want I can quickly test a patch of your changes, or if you can 
> validate once more against either MySQL or PostgreSQL that would be 
> good enough for me too.
>
> AFAIK so far the changes you've committed already were restricted to 
> the portal-driver(-impl) area only.
> Jetspeed doesn't use the portal-driver(-impl) at all, so those changes 
> didn't affect jetspeed.
>
> One thing to keep in mind however is that pluto 2.0.0 has been 
> validated against the JSR-286 TCK and IMO major changes like these 
> need to be TCK tested again. Note: the TCK tests does use/require the 
> portal-driver...
>
> So far, I've been running the JSR-286 TCK tests, but I haven't yet 
> done against your previous changes.
> I'm willing to run the TCK again either after you committed your 
> changes or using a patch, or otherwise discuss with you how you could 
> run the TCK yourself.
>
> Regards,
>
> Ate
>
>>
>> thanks
>> david jencks
>>
>> On Dec 18, 2009, at 1:28 AM, Ate Douma wrote:
>>
>>> Woonsan Ko wrote:
>>>> Hi David,
>>>> Can you try `mvn install -P init' before doing `mvn clean install'?
>>>> This is documented here. [1]
>>>> [1] 
>>>> http://portals.apache.org/jetspeed-2/buildguide/maven-2-build.html, 
>>>> "Building and installing Jetspeed Portal".
>>>
>>> In addition to that, and what is causing your problem here is that 
>>> you'll also need to add org.apache.portals.jetspeed-2 as a Maven 
>>> pluginGroup in your maven settings.xml which is described here:
>>>
>>> http://portals.apache.org/jetspeed-2/buildguide/index.html#PREREQUISITE:_configuration_of_the_Maven_Settings_pluginGroups

>>>
>>>
>>> Ate
>>>
>>>> Kind regards,
>>>> Woonsan
>>>> ----- Original Message ----
>>>>> From: David Jencks <david_jencks@yahoo.com>
>>>>> To: Jetspeed Developers List <jetspeed-dev@portals.apache.org>
>>>>> Sent: Fri, December 18, 2009 5:51:15 AM
>>>>> Subject: Re: Building js2 with tests?
>>>>>
>>>>>
>>>>> On Dec 16, 2009, at 11:32 AM, Randy Watler wrote:
>>>>>
>>>>>> David,
>>>>>>
>>>>>> Here is the sequence I use:
>>>>>>
>>>>>>> mvn clean install
>>>>>>> mvn jetspeed:mvn -Dtarget=testdb
>>>>> I'm mystified.  When I try this step the build fails trying to 
>>>>> find a non-existent plugin: (running with -X, tail end of build):
>>>>>
>>>>> [INFO] Searching repository for plugin with prefix: 'jetspeed'.
>>>>> [DEBUG] Loading plugin prefixes from group: org.apache.maven.plugins
>>>>> [DEBUG] Loading plugin prefixes from group: org.codehaus.mojo
>>>>> [DEBUG] maven-jetspeed-plugin: using locally installed snapshot
>>>>> [DEBUG] Artifact not found - using stub model: Unable to determine 
>>>>> the latest version
>>>>>
>>>>>  org.apache.maven.plugins:maven-jetspeed-plugin:pom:LATEST
>>>>>
>>>>>
>>>>>
>>>>> [DEBUG] Using defaults for missing POM 
>>>>> org.apache.maven.plugins:maven-jetspeed-plugin:pom:LATEST
>>>>> [DEBUG] maven-jetspeed-plugin: using locally installed snapshot
>>>>> [DEBUG] Artifact not found - using stub model: Unable to determine 
>>>>> the release version
>>>>>
>>>>>  org.apache.maven.plugins:maven-jetspeed-plugin:pom:RELEASE
>>>>>
>>>>>
>>>>>
>>>>> [DEBUG] Using defaults for missing POM 
>>>>> org.apache.maven.plugins:maven-jetspeed-plugin:pom:RELEASE
>>>>> [INFO] 
>>>>> ------------------------------------------------------------------------

>>>>>
>>>>> [ERROR] BUILD ERROR
>>>>> [INFO] 
>>>>> ------------------------------------------------------------------------

>>>>>
>>>>> [INFO] The plugin 'org.apache.maven.plugins:maven-jetspeed-plugin' 
>>>>> does not exist or no valid version could be found
>>>>> [INFO] 
>>>>> ------------------------------------------------------------------------

>>>>>
>>>>> [DEBUG] Trace
>>>>> org.apache.maven.lifecycle.LifecycleExecutionException: The plugin 
>>>>> 'org.apache.maven.plugins:maven-jetspeed-plugin' does not exist or 
>>>>> no valid version could be found
>>>>>    at 
>>>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1569)

>>>>>
>>>>>    at 
>>>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor(DefaultLifecycleExecutor.java:1851)

>>>>>
>>>>>    at 
>>>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.segmentTaskListByAggregationNeeds(DefaultLifecycleExecutor.java:462)

>>>>>
>>>>>    at 
>>>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:175)

>>>>>
>>>>>    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
>>>>>    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
>>>>>    at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
>>>>>    at 
>>>>> org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)

>>>>>
>>>>>    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.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>>>>>    at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>>>>>    at 
>>>>> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>>>>>    at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
>>>>> Caused by: 
>>>>> org.apache.maven.plugin.version.PluginVersionNotFoundException: 
>>>>> The plugin 'org.apache.maven.plugins:maven-jetspeed-plugin' does 
>>>>> not exist or no valid version could be found
>>>>>    at 
>>>>> org.apache.maven.plugin.version.DefaultPluginVersionManager.resolvePluginVersion(DefaultPluginVersionManager.java:229)

>>>>>
>>>>>    at 
>>>>> org.apache.maven.plugin.version.DefaultPluginVersionManager.resolvePluginVersion(DefaultPluginVersionManager.java:91)

>>>>>
>>>>>    at 
>>>>> org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPluginManager.java:179)

>>>>>
>>>>>    at 
>>>>> org.apache.maven.plugin.DefaultPluginManager.loadPluginDescriptor(DefaultPluginManager.java:1642)

>>>>>
>>>>>    at 
>>>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1540)

>>>>>
>>>>>    ... 15 more
>>>>> [INFO] 
>>>>> ------------------------------------------------------------------------

>>>>>
>>>>> [INFO] Total time: 4 seconds
>>>>> [INFO] Finished at: Thu Dec 17 20:46:38 PST 2009
>>>>> [INFO] Final Memory: 17M/527M
>>>>> [INFO] 
>>>>> ------------------------------------------------------------------------

>>>>>
>>>>>
>>>>>
>>>>> I normally use maven 2.2.1 but tried also with 2.0.9.
>>>>>
>>>>> Has anyone else seen anything like this?  Any clues?
>>>>>
>>>>> thanks
>>>>> david jencks
>>>>>
>>>>>>> mvn -P test test
>>>>>> There is also a target to combine the last two steps in the 
>>>>>> jetspeed plugin,
>>>>> but I don't use that, (due to general pluginphobia).
>>>>>> HTH,
>>>>>>
>>>>>> Randy
>>>>>>
>>>>>> David Jencks wrote:
>>>>>>> I'm trying to figure out just how much the pluto DI changes I'm

>>>>>>> working on
>>>>> will break js2... so far
>>>>>>> mvn clean install
>>>>>>>
>>>>>>> seems to work, much to my surprise, but if I enable tests I get

>>>>>>> stuck on some
>>>>> db tests.  I looked around briefly but didn't find any instructions.
>>>>>>> What's the secret?
>>>>>>>
>>>>>>> So far I've added this to the root pom properties:
>>>>>>>
>>>>>>>
>>>>> org.apache.derby.jdbc.EmbeddedDriver
>>>>>>>
>>>>> jdbc:derby:${pom.basedir}/target/testdb;create=true
>>>>>>>
>>>>>>> and get errors like this:
>>>>>>>
>>>>>>> ...
>>>>>>> Caused by: ERROR 42X05: Table/View 'CAPABILITY' does not exist.
>>>>>>>       at 
>>>>>>> org.apache.derby.iapi.error.StandardException.newException(Unknown
>>>>> Source)
>>>>>>>       at
>>>>> org.apache.derby.impl.sql.compile.FromBaseTable.bindTableDescriptor(Unknown

>>>>> Source)
>>>>>>>       at
>>>>> org.apache.derby.impl.sql.compile.FromBaseTable.bindNonVTITables(Unknown

>>>>> Source)
>>>>>>>       at 
>>>>>>> org.apache.derby.impl.sql.compile.FromList.bindTables(Unknown
>>>>> Source)
>>>>>>>       at
>>>>> org.apache.derby.impl.sql.compile.SelectNode.bindNonVTITables(Unknown

>>>>> Source)
>>>>>>>       at
>>>>> org.apache.derby.impl.sql.compile.DMLStatementNode.bindTables(Unknown

>>>>> Source)
>>>>>>>       at 
>>>>>>> org.apache.derby.impl.sql.compile.DMLStatementNode.bind(Unknown
>>>>> Source)
>>>>>>>       at 
>>>>>>> org.apache.derby.impl.sql.compile.CursorNode.bindStatement(Unknown
>>>>> Source)
>>>>>>>       at 
>>>>>>> org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown
>>>>> Source)
>>>>>>>       at 
>>>>>>> org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
>>>>>>>       at
>>>>> org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown

>>>>> Source)
>>>>>>>       ... 98 more
>>>>>>> Tests run: 8, Failures: 0, Errors: 8, Skipped: 0, Time elapsed:

>>>>>>> 8.81 sec <<<
>>>>> FAILURE!
>>>>>>> Results :
>>>>>>>
>>>>>>> Tests in error:
>>>>>>> firstTestSetup(org.apache.jetspeed.capabilities.TestCapability)
>>>>>>> testCapability(org.apache.jetspeed.capabilities.TestCapability)
>>>>>>> testNewMimeType(org.apache.jetspeed.capabilities.TestCapability)
>>>>>>> testNewCapability(org.apache.jetspeed.capabilities.TestCapability)
>>>>>>> testNewMediaType(org.apache.jetspeed.capabilities.TestCapability)
>>>>>>> testNewClient(org.apache.jetspeed.capabilities.TestCapability)
>>>>>>> testCapabilityRepeat(org.apache.jetspeed.capabilities.TestCapability)

>>>>>>>
>>>>>>> lastTestTeardown(org.apache.jetspeed.capabilities.TestCapability)
>>>>>>>
>>>>>>> Tests run: 8, Failures: 0, Errors: 8, Skipped: 0
>>>>>>>
>>>>>>> thanks
>>>>>>> david jencks
>>>>>>>
>>>>>>>
>>>>>>> ---------------------------------------------------------------------

>>>>>>>
>>>>>>> To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
>>>>>>> For additional commands, e-mail: 
>>>>>>> jetspeed-dev-help@portals.apache.org
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------

>>>>>>
>>>>>> To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
>>>>>> For additional commands, e-mail: 
>>>>>> jetspeed-dev-help@portals.apache.org
>>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
>>>>> For additional commands, e-mail: jetspeed-dev-help@portals.apache.org
>>>>      
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
>>>> For additional commands, e-mail: jetspeed-dev-help@portals.apache.org
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
>>> For additional commands, e-mail: jetspeed-dev-help@portals.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
>> For additional commands, e-mail: jetspeed-dev-help@portals.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-dev-help@portals.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message