Search in sources :

Example 6 with CacheTransactionManagerCreation

use of org.apache.geode.internal.cache.xmlcache.CacheTransactionManagerCreation in project geode by apache.

the class CacheXml66DUnitTest method testNoTXWriterOnClient.

@Test
public void testNoTXWriterOnClient() throws Exception {
    // test writer is not created
    ClientCacheCreation cc = new ClientCacheCreation();
    CacheTransactionManagerCreation txMgrCreation = new CacheTransactionManagerCreation();
    txMgrCreation.setWriter(new TestTransactionWriter());
    cc.addCacheTransactionManagerCreation(txMgrCreation);
    IgnoredException expectedException = IgnoredException.addIgnoredException(LocalizedStrings.TXManager_NO_WRITER_ON_CLIENT.toLocalizedString());
    try {
        testXml(cc);
        fail("expected exception not thrown");
    } catch (IllegalStateException e) {
    } finally {
        expectedException.remove();
    }
}
Also used : CacheTransactionManagerCreation(org.apache.geode.internal.cache.xmlcache.CacheTransactionManagerCreation) ClientCacheCreation(org.apache.geode.internal.cache.xmlcache.ClientCacheCreation) IgnoredException(org.apache.geode.test.dunit.IgnoredException) Test(org.junit.Test)

Aggregations

CacheTransactionManagerCreation (org.apache.geode.internal.cache.xmlcache.CacheTransactionManagerCreation)6 ClientCacheCreation (org.apache.geode.internal.cache.xmlcache.ClientCacheCreation)6 Test (org.junit.Test)6 CacheCreation (org.apache.geode.internal.cache.xmlcache.CacheCreation)4 Cache (org.apache.geode.cache.Cache)2 CacheTransactionManager (org.apache.geode.cache.CacheTransactionManager)2 ClientCache (org.apache.geode.cache.client.ClientCache)2 TransactionListener (org.apache.geode.cache.TransactionListener)1 TransactionWriter (org.apache.geode.cache.TransactionWriter)1 GemFireCacheImpl (org.apache.geode.internal.cache.GemFireCacheImpl)1 IgnoredException (org.apache.geode.test.dunit.IgnoredException)1