示例#1
0
    def test_01(self):  # pylint: disable=no-self-use
        start_metrics_server()
        cstress = CassandraStressThread(
            LoaderSetDummy(),
            timeout=60,
            node_list=[DbNode()],
            stress_num=1,
            stress_cmd=
            "cassandra-stress write cl=ONE duration=3m -schema 'replication(factor=3) compaction(strategy=SizeTieredCompactionStrategy)'"
            " -port jmx=6868 -mode cql3 native -rate threads=1000 -pop seq=1..10000000 -log interval=5"
        )

        cstress1 = CassandraStressThread(
            LoaderSetDummy(),
            timeout=60,
            node_list=[DbNode()],
            stress_num=1,
            stress_cmd=
            "cassandra-stress write cl=ONE duration=3m -schema 'replication(factor=3) compaction(strategy=SizeTieredCompactionStrategy)'"
            " -port jmx=6868 -mode cql3 native -rate threads=1000 -pop seq=1..10000000 -log interval=5"
        )

        cstress.run()
        time.sleep(5)
        cstress1.run()
        time.sleep(60)
        logging.info("killing")
        Node().remoter.run(
            cmd='pgrep -f cassandra-stress | xargs -I{}  kill -TERM -{}',
            ignore_status=True)

        logging.info(cstress.verify_results())
        logging.info(cstress1.verify_results())
        def test_01(self):
            from sdcm.prometheus import start_metrics_server
            start_metrics_server()
            cs = CassandraStressThread(
                LoaderSetDummy(),
                output_dir=self.temp_dir,
                timeout=60,
                node_list=[DbNode()],
                stress_num=1,
                stress_cmd=
                "cassandra-stress write cl=ONE duration=3m -schema 'replication(factor=3) compaction(strategy=SizeTieredCompactionStrategy)' -port jmx=6868 -mode cql3 native -rate threads=1000 -pop seq=1..10000000 -log interval=5"
            )

            cs1 = CassandraStressThread(
                LoaderSetDummy(),
                output_dir=self.temp_dir,
                timeout=60,
                node_list=[DbNode()],
                stress_num=1,
                stress_cmd=
                "cassandra-stress write cl=ONE duration=3m -schema 'replication(factor=3) compaction(strategy=SizeTieredCompactionStrategy)' -port jmx=6868 -mode cql3 native -rate threads=1000 -pop seq=1..10000000 -log interval=5"
            )

            fs = cs.run()
            time.sleep(5)
            fs1 = cs1.run()
            time.sleep(60)
            print "killing"
            Node().remoter.run(
                cmd='pgrep -f cassandra-stress | xargs -I{}  kill -TERM -{}',
                ignore_status=True)

            print(cs.verify_results())

            print(cs1.verify_results())
    def setUpClass(cls):
        cls.temp_dir = tempfile.mkdtemp()

        start_metrics_server()
        start_events_device(cls.temp_dir, timeout=5)

        cls.killed = Event()

        cls.test_killer = TestKiller(timeout_before_kill=5,
                                     test_callback=cls.killed.set)
        cls.test_killer.start()
        time.sleep(5)
    def setUpClass(cls):
        cls.temp_dir = tempfile.mkdtemp()

        start_metrics_server()
        start_events_device(cls.temp_dir, timeout=5)
        time.sleep(5)

        cls.killed = Event()

        def callback(var):  # pylint: disable=unused-argument
            cls.killed.set()

        cls.test_killer = TestKiller(timeout_before_kill=5,
                                     test_callback=callback)
        cls.test_killer.start()
        time.sleep(5)
    def setUpClass(cls):
        cls.temp_dir = tempfile.mkdtemp()

        start_metrics_server()
        start_events_device(cls.temp_dir, timeout=5)
        time.sleep(5)

        cls.killed = Event()

        def callback(x):
            cls.killed.set()

        cls.grafana_annotator = GrafanaAnnotator()
        cls.grafana_annotator.start()
        cls.test_killer = TestKiller(timeout_before_kill=5, test_callback=callback)
        cls.test_killer.start()
        cls.prometheus_dumper = PrometheusDumper()
        cls.prometheus_dumper.start()
        cls.event_logger = EventsFileLogger()
        cls.event_logger.start(log_dir=cls.temp_dir)
        time.sleep(5)
示例#6
0
 def setUpClass(cls):
     cls.prom_address = start_metrics_server()
     cls.metrics = nemesis_metrics_obj()
示例#7
0
def prom_address():
    yield start_metrics_server()
 def setUpClass(cls) -> None:
     start_metrics_server()
     cls.setup_events_processes(events_device=True, events_main_device=False, registry_patcher=True)
 def setUpClass(cls):
     cls.temp_dir = tempfile.mkdtemp()
     start_metrics_server()
     start_events_device(cls.temp_dir)
     cls.killed = Event()
     time.sleep(5)