Search in sources :

Example 6 with SourceWarning

use of org.teiid.client.SourceWarning in project teiid by teiid.

the class TestDataTierManager method testDataTierTupleSourceWarnings.

@Test
public void testDataTierTupleSourceWarnings() throws Exception {
    DataTierTupleSource info = helpSetup(1);
    connectorManager.addWarning = true;
    assertEquals(10, pullTuples(info, 10));
    assertNotNull(workItem.getConnectorRequest(info.getAtomicRequestMessage().getAtomicRequestID()));
    assertNull(info.nextTuple());
    List<Exception> warnings = context.getAndClearWarnings();
    assertEquals(1, warnings.size());
    SourceWarning warning = (SourceWarning) warnings.get(0);
    assertFalse(warning.isPartialResultsError());
    info.closeSource();
    assertNull(workItem.getConnectorRequest(info.getAtomicRequestMessage().getAtomicRequestID()));
}
Also used : SourceWarning(org.teiid.client.SourceWarning) TeiidComponentException(org.teiid.core.TeiidComponentException) TeiidProcessingException(org.teiid.core.TeiidProcessingException) BlockedException(org.teiid.common.buffer.BlockedException) Test(org.junit.Test)

Aggregations

SourceWarning (org.teiid.client.SourceWarning)6 Test (org.junit.Test)3 BlockedException (org.teiid.common.buffer.BlockedException)3 TeiidException (org.teiid.core.TeiidException)3 TeiidProcessingException (org.teiid.core.TeiidProcessingException)3 TeiidRuntimeException (org.teiid.core.TeiidRuntimeException)3 SQLException (java.sql.SQLException)2 ArrayList (java.util.ArrayList)2 TeiidComponentException (org.teiid.core.TeiidComponentException)2 ByteArrayInputStream (java.io.ByteArrayInputStream)1 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 FileInputStream (java.io.FileInputStream)1 IOException (java.io.IOException)1 ObjectInputStream (java.io.ObjectInputStream)1 ObjectOutputStream (java.io.ObjectOutputStream)1 URLClassLoader (java.net.URLClassLoader)1 CancellationException (java.util.concurrent.CancellationException)1 ExecutionException (java.util.concurrent.ExecutionException)1 DataNotAvailableException (org.teiid.translator.DataNotAvailableException)1 TranslatorException (org.teiid.translator.TranslatorException)1