'Test to validate that custom protocol handlers work with varying types of
results
Connect, create a table with all sorts of data. Query the data, make the sure the custom results handler is
used correctly.
@since 2.7
@jira_ticket PYTHON-313
@expected_result custom protocol handler is invoked with various result types
@test_category data_types:serialization'

def test_custom_raw_row_results_all_types(self):

    cluster = Cluster(protocol_version=PROTOCOL_VERSION)
    session = cluster.connect(keyspace='custserdes')
    session.client_protocol_handler = CustomProtocolHandlerResultMessageTracked
    session.row_factory = tuple_factory
    colnames = create_table_with_all_types('alltypes', session, 1)
    columns_string = ',    '.join(colnames)
    params = get_all_primitive_params(0)
    results = session.execute('SELECT    {0}    FROM    alltypes    WHERE    primkey=0'.format(columns_string))[0]
    for (expected, actual) in zip(params, results):
        self.assertEqual(actual, expected)
    self.assertEqual(len(CustomResultMessageTracked.checked_rev_row_set), (len(PRIMITIVE_DATATYPES) - 1))
    cluster.shutdown()
