Skip to content

test: DAPSetExpressionSessionTest waits for a frame of the next stop to be the current one before it sets a value of that stop - #2216

Merged
lagergren merged 1 commit into
redhat-developer:mainfrom
lagergren:test/dap-set-value-wait-for-new-frame
Nov 24, 2026
Merged

lagergren merged 1 commit into
redhat-developer:mainfrom
lagergren:test/dap-set-value-wait-for-new-frame

Conversation

@lagergren

Copy link
Copy Markdown
Collaborator

What

DAPSetExpressionSessionTest.testSetValueOfAVariableOfAnEarlierStopReportsItAndSendsNothing failed on the Linux 2026.3 job of #2211, which doesn't touch DAP. Its message was "The value is set": Set Value of a variable of the second stop answered with an error.

stopAgain() waited for a new suspend context, and for a DAPStackFrame to be the current frame. The earlier stop's frame is one too, and the session takes the new suspend context before it makes a frame of it the current one. So the wait could end in between. local("answer") then took the variable of the earlier stop, which Set Value rightly reports as out of date.

Change

stopAgain() also waits until the current frame is a different object from the one before the stop. A stop makes new frames, also for a frame whose id and function are the same. The tests that use a value of the earlier stop, DAPJumpToDeclarationSessionTest and DAPJumpToValueSourceSessionTest, don't use the current frame, so they don't have this race.

Only the test changes.

Tests

DAPSetExpressionSessionTest passes headless on IC 2024.2, 2025.3 and IU 2026.3: 19 tests each, also in three runs on 2026.3.

…to be the current one before it sets a value of that stop

stopAgain() waited for a new suspend context and for a DAPStackFrame to
be the current frame. The frame of the earlier stop is one too, and the
session takes the new suspend context before it makes a frame of it the
current one. So the wait could end in between, and the test then took
the variable of the earlier stop, which Set Value rightly reports as out
of date: testSetValueOfAVariableOfAnEarlierStopReportsItAndSendsNothing
failed so on the Linux 2026.3 job of redhat-developer#2211.

stopAgain() now also waits until the current frame is another one than
before the stop.
@lagergren lagergren added this to the 0.30.2 milestone Nov 24, 2026
@lagergren lagergren added bug Something isn't working junit-test labels Nov 24, 2026
@coderabbitai

coderabbitai Bot commented Nov 24, 2026

Copy link
Copy Markdown

Warning

Review limit reached

This review ran on the open-source allowance, not this organization's plan, because the pull request author doesn't have an assigned seat. Waiting won't change this — ask an organization admin to assign them a seat, or add seats in Billing if every seat is already assigned, then retry.

Next included review available in 17 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f880bbd8-e10c-4307-bf26-c8c71b8819b9
Commits

Reviewing files that changed from the base of the PR and between d592c89 and 161c8a5.

Files selected for processing: 1

  • src/test/java/com/redhat/devtools/lsp4ij/dap/client/variables/DAPSetExpressionSessionTest.java

@codecov

codecov Bot commented Nov 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 54.64%. Comparing base (d592c89) to head (161c8a5).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2216      +/-   ##
==========================================
- Coverage   54.65%   54.64%   -0.01%     
==========================================
  Files         834      834              
  Lines       35385    35385              
  Branches     5546     5546              
==========================================
- Hits        19339    19336       -3     
- Misses      13208    13209       +1     
- Partials     2838     2840       +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lagergren
lagergren merged commit cb7e66d into redhat-developer:main Nov 24, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working junit-test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant