Skip to content

Conversation

@Saumya-R
Copy link
Contributor

@Saumya-R Saumya-R commented Jan 6, 2026

This PR adds C++ test cases for multiple KVS (Key-Value Store) instances, extending test coverage beyond the existing Rust implementation.

Key Changes:

  • Extended Python test parametrization to include "cpp" alongside "rust"
  • Implemented three C++ test scenarios for multiple KVS instances with different configurations
  • Added helper utilities for KVS parameter parsing and instance creation

@Saumya-R Saumya-R requested a review from Copilot January 6, 2026 06:33
@github-actions
Copy link

github-actions bot commented Jan 6, 2026

License Check Results

🚀 The license check job ran with the Bazel command:

bazel run //:license-check

Status: ⚠️ Needs Review

Click to expand output
[License Check Output]
Extracting Bazel installation...
Starting local Bazel server (8.3.0) and connecting to it...
INFO: Invocation ID: c7d52e63-0363-4a75-9ee0-970a1f7fc071
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
DEBUG: Rule 'rust_qnx8_toolchain+' indicated that a canonical reproducible form can be obtained by modifying arguments integrity = "sha256-oEubHgeZDdT0svMmBKJx7c3/2TdSI/vfwRUyDn+TPGA="
DEBUG: Repository rust_qnx8_toolchain+ instantiated at:
  <builtin>: in <toplevel>
Repository rule http_archive defined at:
  /home/runner/.bazel/external/bazel_tools/tools/build_defs/repo/http.bzl:394:31: in <toplevel>
Computing main repo mapping: 
Computing main repo mapping: 
Loading: 
Loading: 5 packages loaded
Loading: 5 packages loaded
    currently loading: 
Analyzing: target //:license-check (6 packages loaded, 0 targets configured)
Analyzing: target //:license-check (6 packages loaded, 0 targets configured)

Analyzing: target //:license-check (87 packages loaded, 10 targets configured)

Analyzing: target //:license-check (91 packages loaded, 10 targets configured)

Analyzing: target //:license-check (152 packages loaded, 2946 targets configured)

Analyzing: target //:license-check (162 packages loaded, 3014 targets configured)

INFO: Analyzed target //:license-check (165 packages loaded, 5030 targets configured).
[1 / 11] Creating source manifest for //:license.check.license_check; 0s local
INFO: From Generating Dash formatted dependency file ...:
INFO: Successfully converted 62 packages from Cargo.lock to bazel-out/k8-fastbuild/bin/formatted.txt
INFO: Found 1 target...
Target //:license.check.license_check up-to-date:
  bazel-bin/license.check.license_check
  bazel-bin/license.check.license_check.jar
INFO: Elapsed time: 22.091s, Critical Path: 0.43s
INFO: 14 processes: 5 disk cache hit, 9 internal.
INFO: Build completed successfully, 14 total actions
INFO: Running command line: bazel-bin/license.check.license_check ./formatted.txt <args omitted>
usage: org.eclipse.dash.licenses.cli.Main [-batch <int>] [-cd <url>]
       [-confidence <int>] [-ef <url>] [-excludeSources <sources>] [-help] [-lic
       <url>] [-project <shortname>] [-repo <url>] [-review] [-summary <file>]
       [-timeout <seconds>] [-token <token>]

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds C++ test cases for multiple KVS (Key-Value Store) instances, extending test coverage beyond the existing Rust implementation.

Key Changes:

  • Extended Python test parametrization to include "cpp" alongside "rust"
  • Implemented three C++ test scenarios for multiple KVS instances with different configurations
  • Added helper utilities for KVS parameter parsing and instance creation

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/python_test_cases/tests/test_cit_multiple_kvs.py Added "cpp" to test parametrization and modified assertions to use rounding for floating-point comparison
tests/cpp_test_scenarios/src/main.cpp Added CIT test group registration and reformatted code structure
tests/cpp_test_scenarios/src/helpers/kvs_parameters.hpp New header defining KvsParameters struct for test configuration
tests/cpp_test_scenarios/src/helpers/kvs_parameters.cpp Implements JSON parsing logic to extract KVS parameters from test input
tests/cpp_test_scenarios/src/helpers/kvs_instance.hpp New header declaring kvs_instance factory function
tests/cpp_test_scenarios/src/helpers/kvs_instance.cpp Implements KVS instance builder using parsed parameters
tests/cpp_test_scenarios/src/cit/test_cit_multiple_kvs.hpp Declares three test scenario classes and group creation function
tests/cpp_test_scenarios/src/cit/test_cit_multiple_kvs.cpp Implements test scenarios for multiple KVS instances with value setting/retrieval
tests/cpp_test_scenarios/BUILD Updated build configuration to use glob pattern for source files

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link

github-actions bot commented Jan 6, 2026

The created documentation from the pull request is available at: docu-html

@Saumya-R Saumya-R force-pushed the saumya_multiple_kvs_cpp_testcases branch from 3c7d065 to d350af5 Compare January 6, 2026 06:42
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

*
* SPDX-License-Identifier: Apache-2.0
********************************************************************************/
#include <exception>
Copy link

Copilot AI Jan 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The <exception> include is unnecessary since std::exception is already available through other includes. Consider removing this redundant include.

Suggested change
#include <exception>

Copilot uses AI. Check for mistakes.
auto it2 = obj.find("kvs_parameters_2");
if (it1 == obj.end() || it2 == obj.end())
{
std::cout << "[DEBUG] FINDING Error: " << any_res.error().Message() << std::endl;
Copy link

Copilot AI Jan 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error message accesses any_res.error() even though any_res was successfully parsed at this point (line 149). This will likely cause a runtime error or undefined behavior. The error handling should use a different error message or create a proper error object.

Suggested change
std::cout << "[DEBUG] FINDING Error: " << any_res.error().Message() << std::endl;
std::cout << "[DEBUG] FINDING Error: Missing kvs_parameters_1 or kvs_parameters_2 in parsed JSON object" << std::endl;

Copilot uses AI. Check for mistakes.
}
catch (const std::exception &e)
{
throw e;
Copy link

Copilot AI Jan 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-throwing the caught exception with throw e; causes object slicing and loses the original exception type. Use throw; instead to preserve the exception type.

Suggested change
throw e;
throw;

Copilot uses AI. Check for mistakes.
catch (const std::exception &e)
{

throw e;
Copy link

Copilot AI Jan 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-throwing the caught exception with throw e; causes object slicing and loses the original exception type. Use throw; instead to preserve the exception type.

Suggested change
throw e;
throw;

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant