Merge pull request #358 from kishkaru/jenkins_fixes

A few more test stabilizations
This commit is contained in:
Kishan Karunaratne 2015-06-18 18:59:19 -07:00
commit da7727b905
2 changed files with 13 additions and 13 deletions

View File

@ -261,7 +261,7 @@ class TypeTests(unittest.TestCase):
if datatype in string_types:
string_columns.add(col_name)
s.execute("CREATE TABLE all_empty ({0})".format(', '.join(alpha_type_list)))
execute_until_pass(s, "CREATE TABLE all_empty ({0})".format(', '.join(alpha_type_list)))
# verify all types initially null with simple statement
columns_string = ','.join(col_names)
@ -349,11 +349,11 @@ class TypeTests(unittest.TestCase):
"""
s = self.session
s.execute("CREATE TABLE empty_values (a text PRIMARY KEY, b int)")
s.execute("INSERT INTO empty_values (a, b) VALUES ('a', blobAsInt(0x))")
execute_until_pass(s, "CREATE TABLE empty_values (a text PRIMARY KEY, b int)")
execute_until_pass(s, "INSERT INTO empty_values (a, b) VALUES ('a', blobAsInt(0x))")
try:
Int32Type.support_empty_values = True
results = s.execute("SELECT b FROM empty_values WHERE a='a'")[0]
results = execute_until_pass(s, "SELECT b FROM empty_values WHERE a='a'")[0]
self.assertIs(EMPTY, results.b)
finally:
Int32Type.support_empty_values = False

View File

@ -326,21 +326,21 @@ class UDTTests(unittest.TestCase):
def nested_udt_schema_helper(self, session, MAX_NESTING_DEPTH):
# create the seed udt
session.execute("CREATE TYPE depth_0 (age int, name text)")
execute_until_pass(session, "CREATE TYPE depth_0 (age int, name text)")
# create the nested udts
for i in range(MAX_NESTING_DEPTH):
session.execute("CREATE TYPE depth_{} (value frozen<depth_{}>)".format(i + 1, i))
execute_until_pass(session, "CREATE TYPE depth_{} (value frozen<depth_{}>)".format(i + 1, i))
# create a table with multiple sizes of nested udts
# no need for all nested types, only a spot checked few and the largest one
session.execute("CREATE TABLE mytable ("
"k int PRIMARY KEY, "
"v_0 frozen<depth_0>, "
"v_1 frozen<depth_1>, "
"v_2 frozen<depth_2>, "
"v_3 frozen<depth_3>, "
"v_{0} frozen<depth_{0}>)".format(MAX_NESTING_DEPTH))
execute_until_pass(session, "CREATE TABLE mytable ("
"k int PRIMARY KEY, "
"v_0 frozen<depth_0>, "
"v_1 frozen<depth_1>, "
"v_2 frozen<depth_2>, "
"v_3 frozen<depth_3>, "
"v_{0} frozen<depth_{0}>)".format(MAX_NESTING_DEPTH))
def nested_udt_creation_helper(self, udts, i):
if i == 0: