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: [email protected]
For additional commands, e-mail: [email protected]