#NEWLINE# def test_wide_table( self ) : #NEWLINE# #INDENT# table = 'wide_table' #NEWLINE# table_width = 330 #NEWLINE# session = self . make_session_and_keyspace ( ) #NEWLINE# table_declaration = 'CREATE TABLE %s (key INT PRIMARY KEY, ' #NEWLINE# table_declaration += ' INT, ' . join ( ( create_column_name ( i ) for i in range ( table_width ) ) ) #NEWLINE# table_declaration += ' INT)' #NEWLINE# session . execute ( ( table_declaration % table ) ) #NEWLINE# insert_statement = 'INSERT INTO %s (key, ' #NEWLINE# insert_statement += ', ' . join ( ( create_column_name ( i ) for i in range ( table_width ) ) ) #NEWLINE# insert_statement += ') VALUES (%s, ' #NEWLINE# insert_statement += ', ' . join ( ( str ( i ) for i in range ( table_width ) ) ) #NEWLINE# insert_statement += ')' #NEWLINE# insert_statement = ( insert_statement % ( table , 0 ) ) #NEWLINE# session . execute ( SimpleStatement ( insert_statement , consistency_level = ConsistencyLevel . QUORUM ) ) #NEWLINE# result = session . execute ( ( 'SELECT * FROM %s WHERE key=%s' % ( table , 0 ) ) ) #NEWLINE# for row in result : #NEWLINE# #INDENT# for i in range ( session ) : #NEWLINE# #INDENT# self . assertEqual ( row [ create_column_name ( i ) ] , i ) #NEWLINE# #UNINDENT# #UNINDENT# session . cluster . shutdown ( )