Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion bdd/cpp/features/step_definitions/background_steps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

#include <cstdlib>
#include <string>
#include <utility>

#include "world.hpp"

Expand All @@ -44,7 +45,9 @@ GIVEN("^I have a running Iggy server$") {
// Empty address makes the SDK fall back to its default TCP endpoint; in CI the address
// is supplied via IGGY_TCP_ADDRESS (e.g. iggy-server:8090).
const std::string address = env_or("IGGY_TCP_ADDRESS", "");
iggy::ffi::Client *client = iggy::ffi::new_connection(address);
iggy::ffi::IggyClientConfig config{};
config.server_address = address;
iggy::ffi::Client *client = iggy::ffi::new_connection(std::move(config));
ASSERT_NE(client, nullptr);
context->client = client;
context->client->connect();
Expand Down
18 changes: 9 additions & 9 deletions bdd/cpp/features/step_definitions/messaging_steps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,15 @@ WHEN("^I create a topic with name \"([^\"]{1,255})\" in stream ([0-9]+) with ([0
// Drive the SDK through the typed helpers in iggy.hpp rather than raw strings. Options that
// still take plain strings below (partitioning kind, consumer kind) mark where the C++ SDK
// does not yet expose a typed wrapper.
const auto compression = iggy::CompressionAlgorithm::none();
const auto message_expiry = iggy::Expiry::never_expire();
const auto max_topic_size = iggy::MaxTopicSize::server_default();
const auto compression = iggy::CompressionAlgorithm::None();
const auto message_expiry = iggy::Expiry::NeverExpire();
const auto max_topic_size = iggy::MaxTopicSize::ServerDefault();

context->client->create_topic(bdd::make_numeric_identifier(static_cast<std::uint32_t>(stream_id)), topic_name,
static_cast<std::uint32_t>(partitions_count),
std::string(compression.compression_algorithm_value()), 0,
std::string(message_expiry.expiry_kind()), message_expiry.expiry_value(),
std::string(max_topic_size.max_topic_size()));
std::string(compression.CompressionAlgorithmValue()), 0,
std::string(message_expiry.ExpiryKind()), message_expiry.ExpiryValue(),
std::string(max_topic_size.MaxTopicSizeValue()));
}

THEN("^the topic should be created successfully$") {
Expand Down Expand Up @@ -146,12 +146,12 @@ WHEN("^I poll messages from stream ([0-9]+), topic ([0-9]+), partition ([0-9]+)
REGEX_PARAM(int, offset);
cucumber::ScenarioScope<bdd::GlobalContext> context;

const auto polling_strategy = iggy::PollingStrategy::offset(static_cast<std::uint64_t>(offset));
const auto polling_strategy = iggy::PollingStrategy::Offset(static_cast<std::uint64_t>(offset));
const auto polled = context->client->poll_messages(
bdd::make_numeric_identifier(static_cast<std::uint32_t>(stream_id)),
bdd::make_numeric_identifier(static_cast<std::uint32_t>(topic_id)), static_cast<std::uint32_t>(partition_id),
"consumer", bdd::make_numeric_identifier(1), std::string(polling_strategy.polling_strategy_kind()),
polling_strategy.polling_strategy_value(), 100, false);
"consumer", bdd::make_numeric_identifier(1), std::string(polling_strategy.PollingStrategyKind()),
polling_strategy.PollingStrategyValue(), 100, false);

context->polled.count = polled.count;
context->polled.offsets.clear();
Expand Down
5 changes: 4 additions & 1 deletion foreign/cpp/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
# Enable BzlMod
common --enable_bzlmod

# Default test behavior
test --test_output=errors
test --cache_test_results=no

# Debug configuration
build:debug --compilation_mode=dbg
build:debug --copt=-g3
Expand All @@ -44,5 +48,4 @@ build:ci --config=release
build:ci --lockfile_mode=error

test:ci --lockfile_mode=error
test:ci --test_output=errors
test:ci --test_summary=detailed
Loading
Loading