Skip to content

fix(tests): enable metric exporters and opentelemetry adapter tests (ARC-001 Phase 1)#332

Merged
kcenon merged 1 commit into
mainfrom
feature/320-fix-disabled-tests-result-api
Jan 8, 2026
Merged

fix(tests): enable metric exporters and opentelemetry adapter tests (ARC-001 Phase 1)#332
kcenon merged 1 commit into
mainfrom
feature/320-fix-disabled-tests-result-api

Conversation

@kcenon

@kcenon kcenon commented Jan 8, 2026

Copy link
Copy Markdown
Owner

Summary

  • Enable 2 of 4 disabled test files from ARC-001 (Low Test Coverage) Phase 1
  • Update test_opentelemetry_adapter.cpp to use Result API patterns
  • Fix namespace issues in udp_transport.h

Changes

Enabled Tests

  • test_metric_exporters.cpp (19 tests) - Already using correct Result API patterns
  • test_opentelemetry_adapter.cpp (16 tests) - Updated to use is_ok() / is_err() patterns

Result API Migration

// Before
EXPECT_TRUE(result);
EXPECT_FALSE(result);

// After
EXPECT_TRUE(result.is_ok());
EXPECT_TRUE(result.is_err());

Fixed Issues

  • udp_transport.h: Fixed namespace issues and added using declaration for base class method

Remaining Tests (Not in this PR)

The following tests require significant API implementation and are tracked separately:

Test Results

[==========] 516 tests from 89 test suites ran
[  PASSED  ] 514 tests

Test Plan

  • Build tests with -DMONITORING_BUILD_TESTS=ON
  • Run ./tests/monitoring_system_tests
  • Verify MetricExportersTest (19 tests) passes
  • Verify OpenTelemetryAdapterTest (16 tests) passes

Partially resolves #320

- Update test_opentelemetry_adapter.cpp to use Result API patterns
  - Replace EXPECT_TRUE(result) with EXPECT_TRUE(result.is_ok())
  - Replace EXPECT_FALSE(result) with EXPECT_TRUE(result.is_err())
  - Fix error code comparisons to use static_cast<int>()
- Update udp_transport.h to fix namespace issues
  - Close namespace before #include directives
  - Add using declaration for base class send method
- Enable test_metric_exporters.cpp and test_opentelemetry_adapter.cpp
  in tests/CMakeLists.txt
- Update comments for remaining disabled tests with required APIs

This enables 2 of 4 disabled tests from ARC-001 Phase 1.
Remaining tests require API implementation (tracked separately).

Resolves partial work on #320
@kcenon kcenon merged commit eb560c9 into main Jan 8, 2026
42 checks passed
@kcenon kcenon deleted the feature/320-fix-disabled-tests-result-api branch January 8, 2026 09:30
kcenon added a commit that referenced this pull request Apr 13, 2026
…332)

- Update test_opentelemetry_adapter.cpp to use Result API patterns
  - Replace EXPECT_TRUE(result) with EXPECT_TRUE(result.is_ok())
  - Replace EXPECT_FALSE(result) with EXPECT_TRUE(result.is_err())
  - Fix error code comparisons to use static_cast<int>()
- Update udp_transport.h to fix namespace issues
  - Close namespace before #include directives
  - Add using declaration for base class send method
- Enable test_metric_exporters.cpp and test_opentelemetry_adapter.cpp
  in tests/CMakeLists.txt
- Update comments for remaining disabled tests with required APIs

This enables 2 of 4 disabled tests from ARC-001 Phase 1.
Remaining tests require API implementation (tracked separately).

Resolves partial work on #320
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.

[TEST] Fix disabled tests - Result<T> API migration (ARC-001 Phase 1)

1 participant