Exemple #1
0
def test_kill_topology(configs):
    mock_storm_cluster = mock.Mock()

    with mock.patch.object(pyleus.cli.topologies, 'StormCluster',
            return_value=mock_storm_cluster) as mock_ctr:
        kill_topology(configs)

    mock_ctr.assert_called_once_with(
        configs.storm_cmd_path,
        configs.nimbus_host,
        configs.nimbus_port,
        configs.verbose,
        configs.jvm_opts,
    )

    mock_storm_cluster.kill.assert_called_once_with(configs.topology_name, configs.wait_time)
def test_kill_topology(configs):
    mock_storm_cluster = mock.Mock()

    with mock.patch.object(pyleus.cli.topologies,
                           'StormCluster',
                           return_value=mock_storm_cluster) as mock_ctr:
        kill_topology(configs)

    mock_ctr.assert_called_once_with(
        configs.storm_cmd_path,
        configs.nimbus_host,
        configs.nimbus_port,
        configs.verbose,
        configs.jvm_opts,
    )

    mock_storm_cluster.kill.assert_called_once_with(configs.topology_name,
                                                    configs.wait_time)
 def run(self, configs):
     kill_topology(configs)
Exemple #4
0
 def run(self, configs):
     kill_topology(configs)