我想按顺序运行两个集成测试。如何在ZIO测试中实现这一点?
这是套房:
suite("Undeploy a Package")(
testM("There is a Package") {
PackageDeployer.deploy(pckg) *> // first deploy
assertM(PackageUndeployer.undeploy(pckg), equalTo(StatusCode.NoContent))
},
testM(s"There is no Package") {
assertM(PackageUndeployer.undeploy(pckg), equalTo(StatusCode.NotFound))
})齐奥测试并行运行这两个测试。是否有办法强制它们按顺序运行?
发布于 2020-01-08 10:11:32
是!您可以使用TestAspect.sequential:
suite("Undeploy a Package")(
testM("There is a Package") {
PackageDeployer.deploy(pckg) *> // first deploy
assertM(PackageUndeployer.undeploy(pckg), equalTo(StatusCode.NoContent))
},
testM(s"There is no Package") {
assertM(PackageUndeployer.undeploy(pckg), equalTo(StatusCode.NotFound))
}) @@ sequentialhttps://stackoverflow.com/questions/59643305
复制相似问题