You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Bergquist, Brett" <BB...@canoga.com> on 2016/07/01 22:08:45 UTC

Re: Can someone comment on my understanding of the code relating to DERBY-6879

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.



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).

Re: Can someone comment on my understanding of the code relating to DERBY-6879

Posted by "Bergquist, Brett" <BB...@canoga.com>.
Thanks Kristian for pointing me in the right direction.  I believe I have found some of the examples that you mentioned and can progress from there.

> On Jul 2, 2016, at 6:15 AM, Kristian Waagan <kr...@apache.org> wrote:
>
> 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).
>>
>


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).

Re: Can someone comment on my understanding of the code relating to DERBY-6879

Posted by Kristian Waagan <kr...@apache.org>.
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\u2019t 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).
>