From f21a34ae3a8a4d5d3a6a33bf96251f5997674a8d Mon Sep 17 00:00:00 2001 From: Christopher Zell Date: Tue, 6 Dec 2022 15:02:15 +0100 Subject: [PATCH 1/4] feat: migrate follower terminate experiment --- .../follower-terminate/experiment.json | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/go-chaos/internal/chaos-experiments/camunda-cloud/production-s/follower-terminate/experiment.json b/go-chaos/internal/chaos-experiments/camunda-cloud/production-s/follower-terminate/experiment.json index 0831f68eb..ea957486d 100644 --- a/go-chaos/internal/chaos-experiments/camunda-cloud/production-s/follower-terminate/experiment.json +++ b/go-chaos/internal/chaos-experiments/camunda-cloud/production-s/follower-terminate/experiment.json @@ -15,7 +15,19 @@ "tolerance": 0, "provider": { "type": "process", - "path": "verify-readiness.sh", + "path": "zbchaos", + "arguments": ["verify", "readiness"], + "timeout": 900 + } + }, + { + "name": "Can deploy process model", + "type": "probe", + "tolerance": 0, + "provider": { + "type": "process", + "path": "zbchaos", + "arguments": ["deploy", "process"], "timeout": 900 } }, @@ -25,8 +37,8 @@ "tolerance": 0, "provider": { "type": "process", - "path": "verify-steady-state.sh", - "arguments": "1", + "path": "zbchaos", + "arguments": ["verify", "instance-creation", "--partitionId", "1"], "timeout": 900 } } @@ -38,8 +50,8 @@ "name": "Terminate follower of partition 1", "provider": { "type": "process", - "path": "terminate-partition.sh", - "arguments": [ "Follower", "1"] + "path": "zbchaos", + "arguments": ["terminate", "broker", "--role", "FOLLOWER", "--partitionId", "1"] } } ], From 0af17cc82d14372fb63616c2e95f889248c56419 Mon Sep 17 00:00:00 2001 From: Christopher Zell Date: Tue, 6 Dec 2022 20:53:44 +0100 Subject: [PATCH 2/4] test: rm unnecessary newlines in log When container log is printed newlines already part of the strings --- go-chaos/integration/integration_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go-chaos/integration/integration_test.go b/go-chaos/integration/integration_test.go index a5d1ef330..23190d179 100644 --- a/go-chaos/integration/integration_test.go +++ b/go-chaos/integration/integration_test.go @@ -110,5 +110,5 @@ type Printer struct { } func (p *Printer) Accept(l testcontainers.Log) { - fmt.Println(string(l.Content)) + fmt.Print(string(l.Content)) } From d779de4f5f7fae3320c94445fdabfed034ed3cef Mon Sep 17 00:00:00 2001 From: Christopher Zell Date: Tue, 6 Dec 2022 20:54:18 +0100 Subject: [PATCH 3/4] test: remove pauses Remove the pauses modifier, which caused to delay the test execution --- .../camunda-cloud/test/integration/experiment.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/go-chaos/internal/chaos-experiments/camunda-cloud/test/integration/experiment.json b/go-chaos/internal/chaos-experiments/camunda-cloud/test/integration/experiment.json index f72ced149..174be89a2 100644 --- a/go-chaos/internal/chaos-experiments/camunda-cloud/test/integration/experiment.json +++ b/go-chaos/internal/chaos-experiments/camunda-cloud/test/integration/experiment.json @@ -32,9 +32,6 @@ "path": "zbchaos", "arguments": ["version"], "timeout": 900 - }, - "pauses": { - "after": 5 } } ], From 0d74f30f5fe70fc2b59850ed601ef3c8823d99a7 Mon Sep 17 00:00:00 2001 From: Christopher Zell Date: Tue, 6 Dec 2022 20:54:39 +0100 Subject: [PATCH 4/4] feat: migrate leader restart --- .../leader-restart/experiment.json | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/go-chaos/internal/chaos-experiments/camunda-cloud/production-s/leader-restart/experiment.json b/go-chaos/internal/chaos-experiments/camunda-cloud/production-s/leader-restart/experiment.json index f6e7d9556..806963bf9 100644 --- a/go-chaos/internal/chaos-experiments/camunda-cloud/production-s/leader-restart/experiment.json +++ b/go-chaos/internal/chaos-experiments/camunda-cloud/production-s/leader-restart/experiment.json @@ -15,7 +15,19 @@ "tolerance": 0, "provider": { "type": "process", - "path": "verify-readiness.sh", + "path": "zbchaos", + "arguments": ["verify", "readiness"], + "timeout": 900 + } + }, + { + "name": "Can deploy process model", + "type": "probe", + "tolerance": 0, + "provider": { + "type": "process", + "path": "zbchaos", + "arguments": ["deploy", "process"], "timeout": 900 } }, @@ -25,8 +37,8 @@ "tolerance": 0, "provider": { "type": "process", - "path": "verify-steady-state.sh", - "arguments": "1", + "path": "zbchaos", + "arguments": ["verify", "instance-creation", "--partitionId", "1"], "timeout": 900 } } @@ -35,11 +47,11 @@ "method": [ { "type": "action", - "name": "Terminate leader of partition 1", + "name": "Restart leader of partition 1", "provider": { "type": "process", - "path": "shutdown-gracefully-partition.sh", - "arguments": [ "Leader", "1" ] + "path": "zbchaos", + "arguments": ["restart", "broker", "--role", "LEADER", "--partitionId", "1"] } } ],