mirror of https://github.com/apache/cassandra
Merge branch 'cassandra-3.0' into cassandra-3.11
This commit is contained in:
commit
c3d51a825c
|
|
@ -1,5 +1,6 @@
|
|||
3.11.13
|
||||
Merged from 3.0:
|
||||
* Fix flaky test - test_cqlsh_completion.TestCqlshCompletion (CASSANDRA-17338)
|
||||
* Fixed TestCqlshOutput failing tests (CASSANDRA-17386)
|
||||
* Lazy transaction log replica creation allows incorrect replica content divergence during anticompaction (CASSANDRA-17273)
|
||||
* LeveledCompactionStrategy disk space check improvements (CASSANDRA-17272)
|
||||
|
|
@ -398,7 +399,7 @@ Merged from 2.1:
|
|||
* Fix ReadCommandTest (CASSANDRA-14234)
|
||||
* Remove trailing period from latency reports at keyspace level (CASSANDRA-14233)
|
||||
* Backport CASSANDRA-13080: Use new token allocation for non bootstrap case as well (CASSANDRA-14212)
|
||||
* Remove dependencies on JVM internal classes from JMXServerUtils (CASSANDRA-14173)
|
||||
* Remove dependencies on JVM internal classes from JMXServerUtils (CASSANDRA-14173)
|
||||
* Add DEFAULT, UNSET, MBEAN and MBEANS to `ReservedKeywords` (CASSANDRA-14205)
|
||||
* Add Unittest for schema migration fix (CASSANDRA-14140)
|
||||
* Print correct snitch info from nodetool describecluster (CASSANDRA-13528)
|
||||
|
|
|
|||
|
|
@ -270,8 +270,8 @@ class CqlshRunner(ProcRunner):
|
|||
else:
|
||||
self.output_header = self.read_to_next_prompt()
|
||||
|
||||
def read_to_next_prompt(self):
|
||||
return self.read_until(self.prompt, timeout=10.0, ptty_timeout=3)
|
||||
def read_to_next_prompt(self, timeout=10.0):
|
||||
return self.read_until(self.prompt, timeout=timeout, ptty_timeout=3)
|
||||
|
||||
def read_up_to_timeout(self, timeout, blksize=4096):
|
||||
output = ProcRunner.read_up_to_timeout(self, timeout, blksize=blksize)
|
||||
|
|
|
|||
|
|
@ -19,9 +19,12 @@
|
|||
|
||||
from __future__ import with_statement
|
||||
|
||||
import locale
|
||||
import os
|
||||
import re
|
||||
from .basecase import BaseTestCase, cqlsh
|
||||
from .cassconnect import testrun_cqlsh
|
||||
from .run_cqlsh import TimeoutError
|
||||
import unittest
|
||||
import sys
|
||||
|
||||
|
|
@ -42,7 +45,11 @@ completion_separation_re = re.compile(r'\s+')
|
|||
class CqlshCompletionCase(BaseTestCase):
|
||||
|
||||
def setUp(self):
|
||||
self.cqlsh_runner = testrun_cqlsh(cqlver=None, env={'COLUMNS': '100000'})
|
||||
env = os.environ.copy()
|
||||
env['COLUMNS'] = '100000'
|
||||
if (locale.getpreferredencoding() != 'UTF-8'):
|
||||
env['LC_CTYPE'] = 'en_US.utf8'
|
||||
self.cqlsh_runner = testrun_cqlsh(cqlver=None, env=env)
|
||||
self.cqlsh = self.cqlsh_runner.__enter__()
|
||||
|
||||
def tearDown(self):
|
||||
|
|
@ -132,8 +139,14 @@ class CqlshCompletionCase(BaseTestCase):
|
|||
other_choices_ok=other_choices_ok,
|
||||
split_completed_lines=split_completed_lines)
|
||||
finally:
|
||||
self.cqlsh.send(CTRL_C) # cancel any current line
|
||||
self.cqlsh.read_to_next_prompt()
|
||||
try:
|
||||
self.cqlsh.send(CTRL_C) # cancel any current line
|
||||
self.cqlsh.read_to_next_prompt(timeout=1.0)
|
||||
except TimeoutError:
|
||||
# retry once
|
||||
self.cqlsh.send(CTRL_C)
|
||||
self.cqlsh.read_to_next_prompt(timeout=10.0)
|
||||
|
||||
|
||||
def strategies(self):
|
||||
return self.module.CqlRuleSet.replication_strategies
|
||||
|
|
|
|||
Loading…
Reference in New Issue