Den 02.07.2016 00.08, skrev Bergquist, Brett: > I opened: > > https://issues.apache.org/jira/browse/DERBY-6896 > > I wrote that i need some help writing a test case whereby the test case needs > to connect to the network server, perform some XA transaction work without > completing, and abnormally exiting. I don’t know how to do this within the > testing framework. This is the second comment on the issue.
Hi Brett, You might have what you need in org.apache.derbyTesting.junit. I'm thinking in-process network server, a separate JVM process for the client work running a JUnit test. I believe we have similar setups, maybe for the [new] compatibilty or upgrade tests? The spawned process can either just leave the connection in the required state, or it can run System.exit if that is required to reach that state. You can alternatively have SpawnedProcess kill the process. These Derby-specific decorators and support code are not the easiest to deal with without any prior experience, so keep asking if you run into a wall :) Since you need to do stuff on both sides / in both procceses, you may have to use some lower level code directly in your test (i.e. the decorators won't fit you use case). Regards, -- Kristian > > > > Canoga Perkins > 20600 Prairie Street > Chatsworth, CA 91311 > (818) 718-6300 > > This e-mail and any attached document(s) is confidential and is intended only > for the review of the party to whom it is addressed. If you have received > this transmission in error, please notify the sender immediately and discard > the original message and any attachment(s). >
