Skip to content

Commit

Permalink
fix format
Browse files Browse the repository at this point in the history
Signed-off-by: ohadvano <[email protected]>
  • Loading branch information
ohadvano committed Mar 18, 2024
1 parent 4981937 commit f12911c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
9 changes: 4 additions & 5 deletions source/common/common/backoff_strategy.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
#include <cstdint>
#include <memory>

#include "envoy/config/core/v3/backoff.pb.h"
#include "envoy/config/core/v3/backoff.pb.validate.h"
#include "envoy/common/backoff_strategy.h"
#include "envoy/common/random_generator.h"
#include "envoy/config/core/v3/backoff.pb.h"
#include "envoy/config/core/v3/backoff.pb.validate.h"

#include "source/common/common/assert.h"
#include "source/common/protobuf/utility.h"
Expand Down Expand Up @@ -108,9 +108,8 @@ class BackOffStrategyUtils {
uint64_t default_base_interval_ms, uint64_t max_interval_factor) {
uint64_t base_interval_ms =
PROTOBUF_GET_MS_OR_DEFAULT(backoff_strategy, base_interval, default_base_interval_ms);
uint64_t max_interval_ms =
PROTOBUF_GET_MS_OR_DEFAULT(backoff_strategy, max_interval,
base_interval_ms * max_interval_factor);
uint64_t max_interval_ms = PROTOBUF_GET_MS_OR_DEFAULT(backoff_strategy, max_interval,
base_interval_ms * max_interval_factor);

if (max_interval_ms < base_interval_ms) {
return absl::InvalidArgumentError("max_interval must be greater or equal to base_interval");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -524,8 +524,7 @@ TEST_F(FluentdAccessLogTest, InvalidBackoffConfig) {
retry_options->mutable_backoff_options()->mutable_base_interval()->set_seconds(3);
retry_options->mutable_backoff_options()->mutable_max_interval()->set_seconds(2);

EXPECT_CALL(context_.server_factory_context_.cluster_manager_,
checkActiveStaticCluster(_))
EXPECT_CALL(context_.server_factory_context_.cluster_manager_, checkActiveStaticCluster(_))
.WillOnce(Return(absl::OkStatus()));

EXPECT_THROW_WITH_MESSAGE(
Expand Down

0 comments on commit f12911c

Please sign in to comment.