Search in sources :

Example 1 with MultipleAdminObject1Impl

use of org.jboss.as.test.integration.jca.rar.MultipleAdminObject1Impl in project wildfly by wildfly.

the class LongRunningThreadsCheckTestCase method testWmWithLongRunningThreads.

/**
     * Tests work manager with long-running-threads set
     *
     * @throws Throwable Thrown if case of an error
     */
@Test
public void testWmWithLongRunningThreads() throws Throwable {
    assertNotNull("A2 not found", adminObject2);
    MultipleAdminObject1Impl impl = (MultipleAdminObject1Impl) adminObject2;
    MultipleResourceAdapter3 adapter = (MultipleResourceAdapter3) impl.getResourceAdapter();
    assertNotNull(adapter);
    NamedWorkManager manager = adapter.getWorkManager();
    assertEquals(wm + 2, manager.getName());
    assertFalse(manager.getShortRunningThreadPool().equals(manager.getLongRunningThreadPool()));
}
Also used : NamedWorkManager(org.jboss.as.connector.services.workmanager.NamedWorkManager) MultipleAdminObject1Impl(org.jboss.as.test.integration.jca.rar.MultipleAdminObject1Impl) MultipleResourceAdapter3(org.jboss.as.test.integration.jca.rar.MultipleResourceAdapter3) Test(org.junit.Test)

Example 2 with MultipleAdminObject1Impl

use of org.jboss.as.test.integration.jca.rar.MultipleAdminObject1Impl in project wildfly by wildfly.

the class CustomBootstrapContextTestCase method testConfiguration.

/**
     * Test configuration
     *
     * @throws Throwable Thrown if case of an error
     */
@Test
public void testConfiguration() throws Throwable {
    assertNotNull("CF1 not found", connectionFactory1);
    assertNotNull("AO1 not found", adminObject1);
    MultipleAdminObject1Impl impl = (MultipleAdminObject1Impl) adminObject1;
    MultipleResourceAdapter2 adapter = (MultipleResourceAdapter2) impl.getResourceAdapter();
    assertNotNull(adapter);
    assertEquals(wm, adapter.getWorkManagerName());
    assertEquals(ctx, adapter.getBootstrapContextName());
}
Also used : MultipleAdminObject1Impl(org.jboss.as.test.integration.jca.rar.MultipleAdminObject1Impl) MultipleResourceAdapter2(org.jboss.as.test.integration.jca.rar.MultipleResourceAdapter2) Test(org.junit.Test)

Example 3 with MultipleAdminObject1Impl

use of org.jboss.as.test.integration.jca.rar.MultipleAdminObject1Impl in project wildfly by wildfly.

the class LongRunningThreadsCheckTestCase method testWmWithoutLongRunningThreads.

/**
     * Tests work manager without long-running-threads set
     *
     * @throws Throwable Thrown if case of an error
     */
@Test
public void testWmWithoutLongRunningThreads() throws Throwable {
    assertNotNull("A1 not found", adminObject1);
    MultipleAdminObject1Impl impl = (MultipleAdminObject1Impl) adminObject1;
    MultipleResourceAdapter3 adapter = (MultipleResourceAdapter3) impl.getResourceAdapter();
    assertNotNull(adapter);
    NamedWorkManager manager = adapter.getWorkManager();
    assertEquals(wm + 1, manager.getName());
    assertEquals(manager.getShortRunningThreadPool(), manager.getLongRunningThreadPool());
}
Also used : NamedWorkManager(org.jboss.as.connector.services.workmanager.NamedWorkManager) MultipleAdminObject1Impl(org.jboss.as.test.integration.jca.rar.MultipleAdminObject1Impl) MultipleResourceAdapter3(org.jboss.as.test.integration.jca.rar.MultipleResourceAdapter3) Test(org.junit.Test)

Aggregations

MultipleAdminObject1Impl (org.jboss.as.test.integration.jca.rar.MultipleAdminObject1Impl)3 Test (org.junit.Test)3 NamedWorkManager (org.jboss.as.connector.services.workmanager.NamedWorkManager)2 MultipleResourceAdapter3 (org.jboss.as.test.integration.jca.rar.MultipleResourceAdapter3)2 MultipleResourceAdapter2 (org.jboss.as.test.integration.jca.rar.MultipleResourceAdapter2)1