当前位置: 首页>>代码示例>>Python>>正文


Python TestHelper.shutdown方法代码示例

本文整理汇总了Python中TestHelper.TestHelper.shutdown方法的典型用法代码示例。如果您正苦于以下问题:Python TestHelper.shutdown方法的具体用法?Python TestHelper.shutdown怎么用?Python TestHelper.shutdown使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TestHelper.TestHelper的用法示例。


在下文中一共展示了TestHelper.shutdown方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: errorExit

# 需要导入模块: from TestHelper import TestHelper [as 别名]
# 或者: from TestHelper.TestHelper import shutdown [as 别名]
    if not cluster.spreadFundsAndValidate(10):
        errorExit("Failed to spread and validate funds.")

    Print("Wait on cluster sync.")
    if not cluster.waitOnClusterSync():
        errorExit("Cluster sync wait failed.")

    Print ("Relaunch dead cluster nodes instances.")
    if cluster.relaunchEosInstances() is False:
        errorExit("Failed to relaunch Eos instances")
    Print("nodeos instances relaunched.")

    Print ("Resyncing cluster nodes.")
    if not cluster.waitOnClusterSync():
        errorExit("Cluster never synchronized")
    Print ("Cluster synched")

    Print("Spread funds and validate")
    if not cluster.spreadFundsAndValidate(10):
        errorExit("Failed to spread and validate funds.")

    Print("Wait on cluster sync.")
    if not cluster.waitOnClusterSync():
        errorExit("Cluster sync wait failed.")

    testSuccessful=True
finally:
    TestHelper.shutdown(cluster, walletMgr, testSuccessful, killEosInstances, killEosInstances, keepLogs, killAll, dumpErrorDetails)

exit(0)
开发者ID:108518,项目名称:eos,代码行数:32,代码来源:restart-scenarios-test.py

示例2: errorExit

# 需要导入模块: from TestHelper import TestHelper [as 别名]
# 或者: from TestHelper.TestHelper import shutdown [as 别名]
        errorExit("Cluster in bad state, received None node")

    Print("Kill cluster nodes.")
    cluster.killall(allInstances=killAll)
    
    Print("Restart nodeos repeatedly to ensure dirty database flag sticks.")
    timeout=3
    
    for i in range(1,4):
        Print("Attempt %d." % (i))
        ret = runNodeosAndGetOutput(timeout)
        assert(ret)
        assert(isinstance(ret, tuple))
        assert(ret[0])
        assert(ret[1])
        assert(isinstance(ret[1], dict))
        # pylint: disable=unsubscriptable-object
        stderr= ret[1]["stderr"]
        retCode=ret[1]["returncode"]
        assert retCode == 2, "actual return code: %s" % str(retCode)
        assert("database dirty flag set" in stderr)

    if debug: Print("Setting test result to success.")
    testSuccessful=True
finally:
    if debug: Print("Cleanup in finally block.")
    TestHelper.shutdown(cluster, None, testSuccessful, killEosInstances, False, keepLogs, killAll, dumpErrorDetails)

if debug: Print("Exiting test, exit value 0.")
exit(0)
开发者ID:milk57618,项目名称:eos,代码行数:32,代码来源:validate-dirty-db.py


注:本文中的TestHelper.TestHelper.shutdown方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。