Grokbase Groups Turbine dev May 2009
FAQ

[Turbine-dev] [fulcrum] [VOTE] Release fulcrum-testcontainer-1.0.6 based on RC1

Thomas Vandahl
May 3, 2009 at 8:38 pm
Hi folks,

A release candidate for fulcrum-testcontainer-1.0.6 has been prepared.
After the fulcrum-yaafi artifacts have been mirrored, you can verify
this release candidate. Please vote...

Tag:

https://svn.apache.org/repos/asf/turbine/fulcrum/tags/FULCRUM_TEST_CONTAINER_1_0_6/

Site:

http://turbine.apache.org/builds/fulcrum/fulcrum-testcontainer/1.0.6/RC1/site/

Binaries:

http://turbine.apache.org/builds/turbine/fulcrum/fulcrum-testcontainer/1.0.6/RC1/staged/org/apache/fulcrum/fulcrum-testcontainer/1.0.6/


[ ] +1 release it
[ ] +0 go ahead I don't care
[ ] -1 no, do not release it because

Bye, Thomas.

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

Search Discussions

11 responses

  • Scott Eade at May 4, 2009 at 5:17 am
    Is it just me or does YaafiContainerTest fail (see below) when it is run
    using mvn? It seems to run fine within eclipse.

    -------------------------------------------------------------------------------
    Test set: org.apache.fulcrum.testcontainer.YaafiContainerTest
    -------------------------------------------------------------------------------
    Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.06 sec
    <<< FAILURE!
    testLoadingContainerWithNoRolesfileFails(org.apache.fulcrum.testcontainer.YaafiContainerTest)
    Time elapsed: 0.033 sec <<< FAILURE!
    junit.framework.AssertionFailedError: We should fail
    at junit.framework.Assert.fail(Assert.java:47)
    at
    org.apache.fulcrum.testcontainer.YaafiContainerTest.testLoadingContainerWithNoRolesfileFails(YaafiContainerTest.java:94)


    Scott

    Thomas Vandahl wrote:
    Hi folks,

    A release candidate for fulcrum-testcontainer-1.0.6 has been prepared.
    After the fulcrum-yaafi artifacts have been mirrored, you can verify
    this release candidate. Please vote...

    Tag:

    https://svn.apache.org/repos/asf/turbine/fulcrum/tags/FULCRUM_TEST_CONTAINER_1_0_6/

    Site:

    http://turbine.apache.org/builds/fulcrum/fulcrum-testcontainer/1.0.6/RC1/site/

    Binaries:

    http://turbine.apache.org/builds/turbine/fulcrum/fulcrum-testcontainer/1.0.6/RC1/staged/org/apache/fulcrum/fulcrum-testcontainer/1.0.6/


    [ ] +1 release it
    [ ] +0 go ahead I don't care
    [ ] -1 no, do not release it because

    Bye, Thomas.

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: dev-unsubscribe@turbine.apache.org
    For additional commands, e-mail: dev-help@turbine.apache.org
    ---------------------------------------------------------------------
    To unsubscribe, e-mail: dev-unsubscribe@turbine.apache.org
    For additional commands, e-mail: dev-help@turbine.apache.org
  • Thomas Vandahl at May 4, 2009 at 4:56 pm

    Scott Eade wrote:
    Is it just me or does YaafiContainerTest fail (see below) when it is run
    using mvn? It seems to run fine within eclipse.
    It works for me(TM). But Gump is unhappy, too. Could you please check
    why YAAFI finds a role file when it shouldn't?

    Bye, Thomas.


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: dev-unsubscribe@turbine.apache.org
    For additional commands, e-mail: dev-help@turbine.apache.org
  • Scott Eade at May 5, 2009 at 7:20 am

    Thomas Vandahl wrote:
    Scott Eade wrote:
    Is it just me or does YaafiContainerTest fail (see below) when it is run
    using mvn? It seems to run fine within eclipse.
    It works for me(TM). But Gump is unhappy, too. Could you please check
    why YAAFI finds a role file when it shouldn't?
    When "mvn test" is executed from the command line the exception does not
    occur and processing continues on to the fail (and so the test fails):
    testLoadingContainerWithNoRolesfileFails(org.apache.fulcrum.testcontainer.YaafiContainerTest)
    Time elapsed: 0.02 sec <<< FAILURE!
    junit.framework.AssertionFailedError: We should fail
    at junit.framework.Assert.fail(Assert.java:47)
    at
    org.apache.fulcrum.testcontainer.YaafiContainerTest.testLoadingContainerWithNoRolesfileFails(YaafiContainerTest.java:94)
    The test case in question does this:
    this.setRoleFileName(null);
    this.setConfigurationFileName(
    "src/test/TestComponentConfigIntegratedRoles.xml");
    And src/test/TestComponentConfigIntegratedRoles.xml reads thus:
    <my-system>
    <component
    role="org.apache.fulcrum.testcontainer.SimpleComponent"
    class="org.apache.fulcrum.testcontainer.AlternativeComponentImpl">
    </component>
    </my-system>
    So is this not the matching role? If so then I can see why the fail
    statement is hit.

    OTOH when it is executed within eclipse it does hit an exception, but
    perhaps it is the wrong one? The exception is caught and thus the fail
    is not hit (and so the test passes):
    [WARNING] Unable to find any resource with the name '/componentRoles.xml'
    [ERROR] Unable to locate the role configuration : /componentRoles.xml
    [ERROR] Could not initialize the container
    org.apache.avalon.framework.configuration.ConfigurationException:
    Unable to locate the role configuration : /componentRoles.xml
    at
    org.apache.fulcrum.yaafi.framework.container.ServiceContainerImpl.initialize(ServiceContainerImpl.java:409)
    at
    org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:245)
    at
    org.apache.fulcrum.yaafi.framework.factory.ServiceContainerFactory.create(ServiceContainerFactory.java:131)
    at
    org.apache.fulcrum.yaafi.framework.factory.ServiceContainerFactory.create(ServiceContainerFactory.java:55)
    at
    org.apache.fulcrum.testcontainer.YAAFIContainer.initialize(YAAFIContainer.java:108)
    at
    org.apache.fulcrum.testcontainer.YAAFIContainer.startup(YAAFIContainer.java:87)
    at
    org.apache.fulcrum.testcontainer.BaseUnitTest.lookup(BaseUnitTest.java:137)
    at
    org.apache.fulcrum.testcontainer.YaafiContainerTest.testLoadingContainerWithNoRolesfileFails(YaafiContainerTest.java:93)
    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 junit.framework.TestCase.runTest(TestCase.java:154)
    at junit.framework.TestCase.runBare(TestCase.java:127)
    at junit.framework.TestResult$1.protect(TestResult.java:106)
    at junit.framework.TestResult.runProtected(TestResult.java:124)
    at junit.framework.TestResult.run(TestResult.java:109)
    at junit.framework.TestCase.run(TestCase.java:118)
    at
    org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
    at
    org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at
    org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
    at
    org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
    at
    org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
    at
    org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
    [DEBUG] Disposing of container...
    [INFO] YaffiContainer has been disposed.
    Why would yaafi be insisting that a componentRoles.xml file be present
    when it is run from within eclipse?

    Scott

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: dev-unsubscribe@turbine.apache.org
    For additional commands, e-mail: dev-help@turbine.apache.org
  • Thomas Vandahl at May 5, 2009 at 7:15 pm

    Scott Eade wrote:
    Why would yaafi be insisting that a componentRoles.xml file be present
    when it is run from within eclipse?
    My guess is something in the range of "forkMode", see
    http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html

    Could you please try to experiment a bit with that?

    Bye, Thomas.


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: dev-unsubscribe@turbine.apache.org
    For additional commands, e-mail: dev-help@turbine.apache.org
  • Scott Eade at May 5, 2009 at 11:55 pm

    Thomas Vandahl wrote:
    Scott Eade wrote:
    Why would yaafi be insisting that a componentRoles.xml file be present
    when it is run from within eclipse?
    My guess is something in the range of "forkMode", see
    http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html

    Could you please try to experiment a bit with that?
    I tried switching to maven-2.1 first but the problem persisted.

    Adding the following to the build element resolved the problem:
    <plugins>
    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <!-- version>2.4.2</version -->
    <configuration>
    <forkMode>always</forkMode>
    </configuration>
    </plugin>
    </plugins>
    I recently switched to OS X for a chunk of my development if this is
    relevant.

    I would still question the specific test case,
    YaafiContainerTest.testLoadingContainerWithNoRolesfileFails(), as it
    appears that the exception that is thrown may not be the one that is
    being tested for.

    I will vote on the testcontainer-1.0.6 release shortly.

    Thanks for your help.

    Scott

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: dev-unsubscribe@turbine.apache.org
    For additional commands, e-mail: dev-help@turbine.apache.org
  • Thomas Vandahl at May 5, 2009 at 7:21 pm

    Scott Eade wrote:
    When "mvn test" is executed from the command line the exception does not
    occur and processing continues on to the fail (and so the test fails):
    One more comment: I use maven 2.1 release. Does that make any difference?

    Bye, Thomas


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: dev-unsubscribe@turbine.apache.org
    For additional commands, e-mail: dev-help@turbine.apache.org
  • Juergen Hoffmann at May 5, 2009 at 10:44 am

    [X] +1 release it
    [ ] +0 go ahead I don't care
    [ ] -1 no, do not release it because
    Kind regards

    Juergen Hoffmann


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: dev-unsubscribe@turbine.apache.org
    For additional commands, e-mail: dev-help@turbine.apache.org
  • Scott Eade at May 6, 2009 at 2:18 am

    Thomas Vandahl wrote:
    Hi folks,

    A release candidate for fulcrum-testcontainer-1.0.6 has been prepared.
    After the fulcrum-yaafi artifacts have been mirrored, you can verify
    this release candidate. Please vote...

    Tag:

    https://svn.apache.org/repos/asf/turbine/fulcrum/tags/FULCRUM_TEST_CONTAINER_1_0_6/

    Site:

    http://turbine.apache.org/builds/fulcrum/fulcrum-testcontainer/1.0.6/RC1/site/
    That site is not there. It looks like
    http://turbine.apache.org/fulcrum/fulcrum-testcontainer/ has been
    updated, though the page banner is missing.
    Binaries:

    http://turbine.apache.org/builds/turbine/fulcrum/fulcrum-testcontainer/1.0.6/RC1/staged/org/apache/fulcrum/fulcrum-testcontainer/1.0.6/


    [ ] +1 release it
    [ ] +0 go ahead I don't care
    [X] -1 no, do not release it because
    The PMD report highlights a few unused imports - certainly not a show
    stopper.

    While the tests do currently pass, IMO
    YaafiContainerTest.testLoadingContainerWithNoRolesfileFails() is passing
    for the wrong reasons (note that the test name does not reflect what is
    being tested). It looks to me like testcontainer is not handling an
    integrated roles and components configuration file as per the documentation.

    This patch separates out the two intermingled concepts - note that the
    new testLoadingContainerWithIntegratedRolesfile() fails:
    Index: src/test/org/apache/fulcrum/testcontainer/YaafiContainerTest.java
    ===================================================================
    --- src/test/org/apache/fulcrum/testcontainer/YaafiContainerTest.java
    (revision 770669)
    +++ src/test/org/apache/fulcrum/testcontainer/YaafiContainerTest.java
    (working copy)
    @@ -84,6 +84,26 @@
    public void testLoadingContainerWithNoRolesfileFails()
    {
    SimpleComponent sc = null;
    + this.setRoleFileName(null);
    + try
    + {
    + sc = (SimpleComponent)
    this.lookup(SimpleComponent.class.getName());
    + fail("We should fail");
    + }
    + catch (ComponentException e)
    + {
    + e.printStackTrace();
    + fail(e.getMessage());
    + }
    + catch (Exception e)
    + {
    + // We expect to fail with a ConfigurationException
    + }
    + }
    +
    + public void testLoadingContainerWithIntegratedRolesfile()
    + {
    + SimpleComponent sc = null;

    this.setRoleFileName(null);
    this.setConfigurationFileName(
    @@ -91,13 +111,16 @@
    try
    {
    sc = (SimpleComponent) this.lookup(SimpleComponent.ROLE);
    - fail("We should fail");
    }
    catch (Exception e)
    {
    - //good We expect to fail
    + e.printStackTrace();
    + fail(e.getMessage());
    }
    -
    + assertTrue(sc instanceof AlternativeComponentImpl);
    + assertNotNull(sc);
    + sc.test();
    + this.release(sc);
    }

    }

    I will happily change my vote if someone can clarify my understanding of
    how this is supposed to work.

    Scott

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: dev-unsubscribe@turbine.apache.org
    For additional commands, e-mail: dev-help@turbine.apache.org
  • Thomas Vandahl at May 6, 2009 at 5:47 pm

    Scott Eade wrote:
    I will happily change my vote if someone can clarify my understanding of
    how this is supposed to work.
    This can only be answered by Siegfried, I guess. If you feel that this
    test should be corrected, don't hesitate to commit your changes. I will
    be happy to cut an RC2 then.

    Bye, Thomas.


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: dev-unsubscribe@turbine.apache.org
    For additional commands, e-mail: dev-help@turbine.apache.org
  • Siegfried Goeschl at May 7, 2009 at 4:27 pm
    Hi folks,

    I'm currently finishing a "Mission Impossible" project and going back to
    normal workload next week - so I politely ask for extending the vote so
    I can have look at it next week ...

    Cheers,

    Siegfried Goeschl

    Thomas Vandahl wrote:
    Scott Eade wrote:
    I will happily change my vote if someone can clarify my understanding of
    how this is supposed to work.
    This can only be answered by Siegfried, I guess. If you feel that this
    test should be corrected, don't hesitate to commit your changes. I will
    be happy to cut an RC2 then.

    Bye, Thomas.


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


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: dev-unsubscribe@turbine.apache.org
    For additional commands, e-mail: dev-help@turbine.apache.org
  • Thomas Vandahl at May 7, 2009 at 7:41 pm

    Siegfried Goeschl wrote:
    I'm currently finishing a "Mission Impossible" project and going back to
    normal workload next week - so I politely ask for extending the vote so
    I can have look at it next week ...
    Looks like we need an RC2 anyway, so don't bother.

    Bye, Thomas.


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

Related Discussions

Discussion Navigation
viewthread | post