# Seemingly out-of-date code being run in test pane

**URL:** https://discourse.julialang.org/t/seemingly-out-of-date-code-being-run-in-test-pane/121067
**Category:** VS Code
**Tags:** testing
**Created:** [October 8, 2024, 6:20pm UTC](https://discourse.julialang.org/t/seemingly-out-of-date-code-being-run-in-test-pane/121067 "2024-10-08T18:20:51Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Ken\_Williams](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ken_williams/32/5289_2.png) [@Ken\_Williams](https://discourse.julialang.org/u/Ken_Williams)
#### Post date: [October 8, 2024, 6:20pm UTC](https://discourse.julialang.org/t/seemingly-out-of-date-code-being-run-in-test-pane/121067/1 "2024-10-08T18:20:51Z")

</div>

This is an old issue, but I think maybe I see what’s causing it:

> [@Prerelease of new testing framework and test run UI in VS Code](https://discourse.julialang.org/t/prerelease-of-new-testing-framework-and-test-run-ui-in-vs-code/86355/53):
>
> I finally figured out why it appeared that the test framework was running out of date code. For reasons that are still unclear sometimes VSCode takes much longer than it should, minutes instead of a fraction of a second, to save small julia files.

I was seeing similar behavior, but I don’t think it’s taking a long time to save, it’s just that the order of events is not what you are expecting.

I too have my VS Code configured to auto-save and auto-format upon focus change, so normally I just code-code-code and then hit the testing button.

But I found that when I make a change to a file, then hit the triangle “play” button in the testing pane, the click action happens _before_ the focus change, so the old code is loaded and programmer confusion ensues.

A quick workaround is to train myself to hit Command-S before running tests; equivalently, click anywhere else but the triangle “play” button first, to change focus, then hit the button.

Is it possible to make the button first invoke auto-save (or just perform the focus change) and _then_ do `Revise`?
