The specification released test cases for Chapter 10 are both the actually API but more
importantly the actual specification text.
F.ex. if you look at the 2nd paragraph in 10.1 - you'll see
anonymous wrote :
| Even though a resource adapter may create Java threads directly and use them to do its
work, an application server may prevent it from creating threads for efficiency, security,
and manageability reasons. In such situations, a resource adapter needs a mechanism to
obtain threads from an application server to do its work.
|
so we should have test cases where the resource adapter uses the WorkManager's thread
pool and where it creates its own threads.
At some point we will have a switch where we will disallow the resource adapters to create
their own threads.
If you look at the first bullet on page 230 (10.1 paragraph 4) it says that
anonymous wrote :
| An application server is optimally designed to manage system resources such as
threads. It may pool threads and reuse them efficiently across different resource adapters
deployed in its runtime environment.
|
so that means that we
1) Should have a ThreadPool for the WorkManager
2) Delegate the Work instances to the ThreadPool for execution
(We have a simple test for 1) currently in the test suite)
For 2) we must test that Work has executed in a separate thread.
So for the specification test cases you must go through each paragraph in the chapter and
see if there are any test cases for that paragraph. Of course there must be both positive
and negative test cases - like we talked about before.
The test cases must identify which chapter / section / paragraph they relate to - f.ex.
| package org.jboss.jca.test.core.spec.chapter10.section1;
|
| ...
| /**
| * Test for paragraph 4 : bullet 1
| */
| @Test
| public void testWorkManagerHasThreadPool()
|
|
Here is another example from 10.3 paragraph 4:
anonymous wrote :
| However, the application server must use threads of the same thread priority level to
process Work instances submitted by a specific resource adapter.
|
So the test case must check that the priority of all the threads in the thread pool have
the same value.
So think about how you would write the TCK test suite for the entire specification - as we
need full coverage.
Hope this helps !
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4212347#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...