Skip to content

fix: correct ASSERT_EQ to ASSERT_NE in admittance controller load test (backport #2264)#2339

Merged
christophfroehlich merged 1 commit into
kiltedfrom
mergify/bp/kilted/pr-2264
May 1, 2026
Merged

fix: correct ASSERT_EQ to ASSERT_NE in admittance controller load test (backport #2264)#2339
christophfroehlich merged 1 commit into
kiltedfrom
mergify/bp/kilted/pr-2264

Conversation

@mergify
Copy link
Copy Markdown
Contributor

@mergify mergify Bot commented May 1, 2026

Fixes #1258

Problem

The test_load_controller test in admittance_controller was using ASSERT_EQ to check against nullptr, which means the test was asserting that the controller fails to load. Since the controller loads successfully with the params file provided, the test was always passing, even though it was checking the wrong condition.

Fix

Changed ASSERT_EQ to ASSERT_NE so the test correctly asserts that the controller loaded successfully (i.e. the result is not nullptr).

Note: range_sensor_broadcaster already has the correct ASSERT_NE in its load test and does not need changes.

Is this user-facing behavior change?

no

Did you use Generative AI?

no


This is an automatic backport of pull request #2264 done by Mergify.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.77%. Comparing base (c2a182f) to head (5a5b74d).
⚠️ Report is 1 commits behind head on kilted.

Additional details and impacted files
@@           Coverage Diff           @@
##           kilted    #2339   +/-   ##
=======================================
  Coverage   85.77%   85.77%           
=======================================
  Files         152      152           
  Lines       15082    15082           
  Branches     1293     1293           
=======================================
  Hits        12936    12936           
  Misses       1688     1688           
  Partials      458      458           
Flag Coverage Δ
unittests 85.77% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ontroller/test/test_load_admittance_controller.cpp 100.00% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@christophfroehlich christophfroehlich merged commit 609db30 into kilted May 1, 2026
15 of 16 checks passed
@christophfroehlich christophfroehlich deleted the mergify/bp/kilted/pr-2264 branch May 1, 2026 12:39
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.

2 participants