def test_element_count_validation(self):
"""
Tests that big collections are detected and raise an exception.
"""
while True:
try:
TestSetModel.create(text_set=set(str(uuid4()) for i in range(65535)))
break
except WriteTimeout:
ex_type, ex, tb = sys.exc_info()
log.warning("{0}: {1} Backtrace: {2}".format(ex_type.__name__, ex, traceback.extract_tb(tb)))
del tb
except OperationTimedOut:
#This will happen if the host is remote
self.assertFalse(CASSANDRA_IP.startswith("127.0.0."))
self.assertRaises(ValidationError, TestSetModel.create, **{'text_set': set(str(uuid4()) for i in range(65536))})
test_container_columns.py 文件源码
python
阅读 30
收藏 0
点赞 0
评论 0
评论列表
文章目录