[wildfly-dev] WFCORE-648 Cascade Ear Exclusions Test Case

Brian Stansberry brian.stansberry at redhat.com
Mon Jun 22 15:12:22 EDT 2015


I don't know enough about the details of this to have any suggestions 
re: how to validate that the exclusions are correct. But I don't think 
DeploymentAddHandlerTestCase is a good base to work from. It's a unit 
test of a particular class that uses mocks and doesn't involve 
DeploymentUnitProcessors at all. You probably need an integration test.

On 6/22/15 1:35 PM, Brandon Gaisford wrote:
> Hey all,
>
> I’ve completed my initial coding for this issue and spent 2-3 hours now trying to come up with a good test case.  I’ve created a test ear that I was planning to include as a test resource to deploy during unit testing.
>
> When I debug using the test ear during normal server startup, I’m seeing this operation and resource within the DeploymentDeployHandler:
>
> operation
> {
>    "operation" => "deploy",
>    "address" => [("deployment" => "test-ear.ear")]
> }
>
> resource
> {
>    "persistent" => false,
>    "owner" => [
>        ("subsystem" => "deployment-scanner"),
>        ("scanner" => "default")
>    ],
>    "runtime-name" => "test-ear.ear",
>    "content" => [{"hash" => bytes {
>        0x00, 0xbb, 0x8a, 0x3a, 0x61, 0x12, 0xa6, 0xec,
>        0x59, 0x69, 0xab, 0x9d, 0xda, 0xe1, 0x48, 0x0e,
>        0x68, 0x92, 0x9a, 0x03
>    }}],
>    "enabled" => undefined
> }
>
> I was thinking I could model my test case after the existing DeploymentAddHandlerTestCase (but instead target DeploymentDeployHandler) and then during the deployment phase inspect some internal state to verify the exclusions are correct in the ModuleStructureSpec.  But now I’m questioning whether this is a bridge too far.
>
> Does anyone have any bright ideas or advice on how I might move forward on this test case?
>
> Thanks,
>
> Brandon
> _______________________________________________
> wildfly-dev mailing list
> wildfly-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/wildfly-dev
>


-- 
Brian Stansberry
Senior Principal Software Engineer
JBoss by Red Hat


More information about the wildfly-dev mailing list