diff --git a/extkafka/alter_limit_connection_create_rate.go b/extkafka/alter_limit_connection_create_rate.go index 670bdf3..b2a0b82 100644 --- a/extkafka/alter_limit_connection_create_rate.go +++ b/extkafka/alter_limit_connection_create_rate.go @@ -71,7 +71,7 @@ func (k *AlterLimitConnectionCreateRateAttack) Describe() action_kit_api.ActionD func (k *AlterLimitConnectionCreateRateAttack) Prepare(_ context.Context, state *AlterLimitConnectionCreateRateState, request action_kit_api.PrepareActionRequestBody) (*action_kit_api.PrepareResult, error) { state.BrokerID = extutil.ToInt32(request.Target.Attributes["kafka.broker.node-id"][0]) - state.BrokerConfigValue = fmt.Sprintf("%d", int(extutil.ToInt64(request.Config["connection_rate"]))) + state.BrokerConfigValue = fmt.Sprintf("%.0f", request.Config["connection_rate"]) return nil, nil } diff --git a/extkafka/alter_max_message_bytes.go b/extkafka/alter_max_message_bytes.go index 46ee83e..09f7d08 100644 --- a/extkafka/alter_max_message_bytes.go +++ b/extkafka/alter_max_message_bytes.go @@ -71,7 +71,7 @@ func (k *AlterMessageMaxBytesAttack) Describe() action_kit_api.ActionDescription func (k *AlterMessageMaxBytesAttack) Prepare(_ context.Context, state *AlterMessageMaxBytesState, request action_kit_api.PrepareActionRequestBody) (*action_kit_api.PrepareResult, error) { state.BrokerID = extutil.ToInt32(request.Target.Attributes["kafka.broker.node-id"][0]) - state.BrokerConfigValue = fmt.Sprintf("%f", request.Config["max_bytes"]) + state.BrokerConfigValue = fmt.Sprintf("%.0f", request.Config["max_bytes"]) return nil, nil } diff --git a/extkafka/alter_num_io_threads.go b/extkafka/alter_num_io_threads.go index 3af01e8..41ef13b 100644 --- a/extkafka/alter_num_io_threads.go +++ b/extkafka/alter_num_io_threads.go @@ -71,7 +71,7 @@ func (k *AlterNumberIOThreadsAttack) Describe() action_kit_api.ActionDescription func (k *AlterNumberIOThreadsAttack) Prepare(_ context.Context, state *AlterNumberIOThreadsState, request action_kit_api.PrepareActionRequestBody) (*action_kit_api.PrepareResult, error) { state.BrokerID = extutil.ToInt32(request.Target.Attributes["kafka.broker.node-id"][0]) - state.BrokerConfigValue = fmt.Sprintf("%f", request.Config["io_threads"]) + state.BrokerConfigValue = fmt.Sprintf("%.0f", request.Config["io_threads"]) return nil, nil } diff --git a/extkafka/alter_num_network_threads.go b/extkafka/alter_num_network_threads.go index b4dc6ce..5b974a0 100644 --- a/extkafka/alter_num_network_threads.go +++ b/extkafka/alter_num_network_threads.go @@ -71,7 +71,7 @@ func (k *AlterNumberNetworkThreadsAttack) Describe() action_kit_api.ActionDescri func (k *AlterNumberNetworkThreadsAttack) Prepare(_ context.Context, state *AlterNumberNetworkThreadsState, request action_kit_api.PrepareActionRequestBody) (*action_kit_api.PrepareResult, error) { state.BrokerID = extutil.ToInt32(request.Target.Attributes["kafka.broker.node-id"][0]) - state.BrokerConfigValue = fmt.Sprintf("%f", request.Config["io_networks"]) + state.BrokerConfigValue = fmt.Sprintf("%.0f", request.Config["io_networks"]) return nil, nil }