[IronJacamar Development] - TestSuite - renaming and repackaging
by Stefano Maestri
Stefano Maestri [http://community.jboss.org/people/maeste] created the discussion
"TestSuite - renaming and repackaging"
To view the discussion, visit: http://community.jboss.org/message/573808#573808
--------------------------------------------------------------
Hi all,
during my refactoring of our test suite I'm wondering if we can make some renaming and repackaging of our test:
* Remove .test package to have test classes in the same namespace of classes under test
* Try to remove also unit namespace where it is there
* We are running as Junit test only classes ending with TestCase. It is a quite usual and classic choice, but it is limiting the opportunity of selecting more self describing name for classes as for method in a BDD style. IOW it would be great to make us free of selecting not only the name of the method (for example shouldDoSomething), but also class name. In a BDD style it would be used to define more than one test stressing a class undertest, verifying in each test different aspect/behavior of class under test. Using a classic pet example we could have 2 different test for class Cat named for example as CatShouldBeAHunter (with methods shouldCatchMouses, shouldEatAnimals etc) and CatShouldBeDomesticAnaimal (with method shouldLoveMe, shouldMakeDisaster and so on :) ). To do that we should refactor also our build to consider every classes in the src/test as test case, apart of course some explicit exclusion. This explicit exclusion will be for support/mock class which should be put into a specific package (support or mock is a good name IMHO) and/or using a suffix in their name.
* At the moment I'll leave every test ala TCK (i.e. org.jboss.jca.test.core.spec.chapter* packages in core module) as is. They are totally different kind of test and should not be considered as unit ones.
Any comment is more than welcome
S.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/573808#573808]
Start a new discussion in IronJacamar Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 1 month
[JBoss AS7 Development] - NPE in StandaloneClientImpl.isDeploymentNameUnique
by Thomas Diesler
Thomas Diesler [http://community.jboss.org/people/thomas.diesler%40jboss.com] created the discussion
"NPE in StandaloneClientImpl.isDeploymentNameUnique"
To view the discussion, visit: http://community.jboss.org/message/570720#570720
--------------------------------------------------------------
Caused by: org.jboss.as.protocol.mgmt.ManagementException: Failed to check deployment name uniqueness.
at org.jboss.as.standalone.client.impl.StandaloneClientImpl.isDeploymentNameUnique(StandaloneClientImpl.java:130)
at org.jboss.as.standalone.client.impl.StandaloneClientDeploymentManager$1.distributeDeploymentContent(StandaloneClientDeploymentManager.java:59)
at org.jboss.as.standalone.client.impl.deployment.DeploymentPlanBuilderImpl.add(DeploymentPlanBuilderImpl.java:187)
at org.jboss.as.standalone.client.impl.deployment.DeploymentPlanBuilderImpl.add(DeploymentPlanBuilderImpl.java:182)
at org.jboss.osgi.plugin.jbossas7.DeployerClientImpl.deploy(DeployerClientImpl.java:85)
... 31 more
Caused by: java.lang.NullPointerException
at org.jboss.as.standalone.client.impl.StandaloneClientImpl.isDeploymentNameUnique(StandaloneClientImpl.java:128)
... 35 more
This repeatedly happens on the http://jbmuc.dyndns.org:8280/hudson/job/jbosgi-remote/34/testReport/junit... EC2 Hudson instance, but cannot be reproduces locally.
boolean isDeploymentNameUnique(String name) {
try {
128: return new CheckUnitDeploymentNameOperation(name).executeForResult(getConnectionStrategy());
} catch (Exception e) {
throw new ManagementException("Failed to check deployment name uniqueness.", e);
}
}
Any idea, how a NPE is even possible given the trace above.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/570720#570720]
Start a new discussion in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 1 month