Skip to content

Commit

Permalink
fix: don't read broken timestamp values
Browse files Browse the repository at this point in the history
Due to camunda/camunda#17347 we can't rely on a sensible value
  • Loading branch information
lenaschoenburg committed Apr 11, 2024
1 parent 4b51fbd commit 755f387
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 19 deletions.
17 changes: 6 additions & 11 deletions go-chaos/cmd/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -356,11 +356,10 @@ type CurrentTopology struct {
}

type BrokerState struct {
Id int32
State string
Version int64
LastUpdatedAt string
Partitions []PartitionState
Id int32
State string
Version int64
Partitions []PartitionState
}

type PartitionState struct {
Expand All @@ -370,17 +369,13 @@ type PartitionState struct {
}

type LastChange struct {
Id int64
Status string
StartedAt string
CompletedAt string
Id int64
Status string
}

type TopologyChange struct {
Id int64
Status string
StartedAt string
CompletedAt string
InternalVersion int64
Completed []Operation
Pending []Operation
Expand Down
10 changes: 2 additions & 8 deletions go-chaos/cmd/cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,12 @@ func Test_DescribeChangeStatusWithPending(t *testing.T) {
Version: 1,
Brokers: []BrokerState{},
LastChange: &LastChange{
Id: 2,
Status: "COMPLETED",
StartedAt: "2021-09-01T12:00:00.000Z",
CompletedAt: "2021-09-01T12:00:00.000Z",
Id: 2,
Status: "COMPLETED",
},
PendingChange: &TopologyChange{
Id: 3,
Status: "IN_PROGRESS",
StartedAt: "2021-09-01T12:00:00.000Z",
CompletedAt: "2021-09-01T12:00:00.000Z",
InternalVersion: 1,
Completed: []Operation{
{
Expand Down Expand Up @@ -82,8 +78,6 @@ func Test_DescribeChangeStatusWithoutCompleted(t *testing.T) {
PendingChange: &TopologyChange{
Id: 3,
Status: "IN_PROGRESS",
StartedAt: "2021-09-01T12:00:00.000Z",
CompletedAt: "2021-09-01T12:00:00.000Z",
InternalVersion: 1,
Completed: []Operation{
{
Expand Down

0 comments on commit 755f387

Please sign in to comment.