From 4fd4daa8e67d5a70573bc6fc40416f4c606afe9b Mon Sep 17 00:00:00 2001 From: Adam Holmberg Date: Thu, 4 Feb 2016 16:21:08 -0600 Subject: [PATCH] test: don't print node status to stdout --- tests/integration/__init__.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/tests/integration/__init__.py b/tests/integration/__init__.py index 43a86cdf..244c054c 100644 --- a/tests/integration/__init__.py +++ b/tests/integration/__init__.py @@ -17,8 +17,12 @@ try: except ImportError: import unittest # noqa +import logging +import os import socket -import os, six, time, sys, logging, traceback +import sys +import time +import traceback from threading import Event from subprocess import call from itertools import groupby @@ -147,9 +151,9 @@ lessthancass30 = unittest.skipUnless(CASSANDRA_VERSION < '3.0', 'Cassandra versi def wait_for_node_socket(node, timeout): binary_itf = node.network_interfaces['binary'] if not common.check_socket_listening(binary_itf, timeout=timeout): - print("Unable to connect to binary socket for node"+str(node)) + log.warn("Unable to connect to binary socket for node " + node.name) else: - print("Node is up and listening "+str(node)) + log.debug("Node %s is up and listening " % (node.name,)) def check_socket_listening(itf, timeout=60): @@ -267,13 +271,13 @@ def use_cluster(cluster_name, nodes, ipformat=None, start=True): if start: log.debug("Starting CCM cluster: {0}".format(cluster_name)) CCM_CLUSTER.start(wait_for_binary_proto=True, wait_other_notice=True, jvm_args=jvm_args) - #Added to wait for slow nodes to start up + # Added to wait for slow nodes to start up for node in CCM_CLUSTER.nodes.values(): wait_for_node_socket(node, 120) setup_keyspace(ipformat=ipformat) except Exception: log.exception("Failed to start CCM cluster; removing cluster.") - + if os.name == "nt": if CCM_CLUSTER: for node in CCM_CLUSTER.nodes.itervalues(): @@ -588,5 +592,3 @@ class BasicExistingSegregatedKeyspaceUnitTestCase(BasicKeyspaceUnitTestCase): def tearDown(self): self.cluster.shutdown() - -