Skip to content
Permalink
Browse files
Integrate SJK into nodetool
Patch by Ekaterina Dimitrov, reviewed by brandonwilliams for
CASSANDRA-12197
  • Loading branch information
ekaterinadimitrova2 authored and driftx committed Jan 10, 2020
1 parent 8282c75 commit a83ede433c9737aa0088cbd6092e6d1651290d10
Showing 1 changed file with 34 additions and 0 deletions.
@@ -445,3 +445,37 @@ def _describe(self, node):
out_sorted = node_describe.split()
out_sorted.sort()
return (node_describe, out_sorted)

@since('4.0')
def test_sjk(self):
"""
Verify that SJK generally works.
"""

cluster = self.cluster
cluster.populate([1]).start()
node = cluster.nodelist()[0]

out, err, _ = node.nodetool('sjk --help')
logger.debug(out)
hasPattern = False
for line in out.split(os.linesep):
if " ttop [Thread Top] Displays threads from JVM process" == line:
hasPattern = True
assert hasPattern == True, "Expected help about SJK ttop"

out, err, _ = node.nodetool('sjk')
logger.debug(out)
hasPattern = False
for line in out.split(os.linesep):
if " ttop [Thread Top] Displays threads from JVM process" == line:
hasPattern = True
assert hasPattern == True, "Expected help about SJK ttop"

out, err, _ = node.nodetool('sjk hh -n 10 --live')
logger.debug(out)
hasPattern = False
for line in out.split(os.linesep):
if re.match('.*Instances.*Bytes.*Type.*', line):
hasPattern = True
assert hasPattern == True, "Expected 'SJK hh' output"

0 comments on commit a83ede4

Please sign in to comment.