Search in sources :

Example 6 with RpcMetadataResponse

use of org.apache.calcite.avatica.remote.Service.RpcMetadataResponse in project calcite-avatica by apache.

the class ErrorResponseTest method testEquality.

@Test
public void testEquality() {
    final String message = "There was an error";
    final int code = 23;
    final String state = "a1b2c";
    final AvaticaSeverity severity = AvaticaSeverity.ERROR;
    final List<String> exceptions = Arrays.asList("Server Stacktrace 1", "Server Stacktace 2");
    final RpcMetadataResponse metadata = new RpcMetadataResponse("localhost:8765");
    assertEquals(new ErrorResponse(message, code, state, severity, exceptions, metadata), new ErrorResponse(message, code, state, severity, exceptions, metadata));
}
Also used : AvaticaSeverity(org.apache.calcite.avatica.AvaticaSeverity) RpcMetadataResponse(org.apache.calcite.avatica.remote.Service.RpcMetadataResponse) ErrorResponse(org.apache.calcite.avatica.remote.Service.ErrorResponse) Test(org.junit.Test)

Aggregations

RpcMetadataResponse (org.apache.calcite.avatica.remote.Service.RpcMetadataResponse)6 Test (org.junit.Test)4 AvaticaSeverity (org.apache.calcite.avatica.AvaticaSeverity)3 ErrorResponse (org.apache.calcite.avatica.remote.Service.ErrorResponse)3 ArrayList (java.util.ArrayList)2 AvaticaClientRuntimeException (org.apache.calcite.avatica.AvaticaClientRuntimeException)2 Meta (org.apache.calcite.avatica.Meta)2 Frame (org.apache.calcite.avatica.Meta.Frame)2 FetchResponse (org.apache.calcite.avatica.remote.Service.FetchResponse)2 IOException (java.io.IOException)1 PrintWriter (java.io.PrintWriter)1 StringWriter (java.io.StringWriter)1 HashMap (java.util.HashMap)1 LinkedList (java.util.LinkedList)1 List (java.util.List)1 AvaticaParameter (org.apache.calcite.avatica.AvaticaParameter)1 ColumnMetaData (org.apache.calcite.avatica.ColumnMetaData)1 ScalarType (org.apache.calcite.avatica.ColumnMetaData.ScalarType)1 ConnectionPropertiesImpl (org.apache.calcite.avatica.ConnectionPropertiesImpl)1 Signature (org.apache.calcite.avatica.Meta.Signature)1