[Bug] Updated exercise didn't give the newest tests on C++ track

While trying to help a student with a learning exercise on the C++ track on discord, I went and update the exercise to the newest version but the test suite didn’t seem to update correctly.

The exercise in question was Election Day for the References concept. There was an additional test (9th) got added (the learner was seeing all 9 tests as intended), however after update the exercise I can still only see 8 of them.

This is what im currently looking at. Also I did change browser and clear cache just in case and it’s still the same.

For extra context, I did solve the exercise before the new update, but I’m pretty sure this shouldn’t matter and updated exercise should always show all the added test.


1 Like

Did you reset the exercise? You can do so in the “…” menu from the editor in the top right corner and select “revert to exercise start”.

Doesn’t the site support updating an exercise to get new tests without resetting?

Sometimes there is a banner, but I don’t see that in glaxxie’s screenshots.

Sorry for the late reply. Yeah I crop the screenshot badly there, but I reset the exercise using ...Revert to exercise start and the test suite is still the same…only show up to 8 and missing the 9th one

It’s possible that maybe you previously submitted the tests file. That’s the only reason I can think for this. @ErikSchierboom can maybe debug more.

Yeah I don’t think that was a possibility because while I do the work on my local env, I submit 99% of all the work via the web editor (bar some exercises that explicitly require to use cli like alphametic)

I just checked, and that is not the case.

Your solution’s git sha points to a SHA that appears to be correct and should include the added test. Could you use the CLI to download things locally and check what test file you’re getting?

CLI downloaded test file indeed included the latest version with added test. I wonder if i should just leave the track (and reset it) and rejoin.

Maybe. It’s very weird!

@glaxxie Just to make sure: Did you re-run the tests? The screenshot does not include that. The Results tab only changes when running the tests (not when updating them / resetting the exercise).

1 Like

This solved it!
I think i can see what’s going on now.
Back when I was doing python, sometimes an old exercise that i completed got updated and included new tests, when I update the exercise the test runner re-run my old submission automatically so it will fail and show the new added test.

It didn’t happen here, thus the confusion. Maybe this one was added with the flag to not trigger test runner to re-run?
But it is quite unusual, because it looks like an important edge case test that surely will fail people old submission if they did it incorrectly.

Sorry for wasting people time and thank you for helping.

1 Like

It might have been merged with no important files changed which would have stopped this from happening (deliberately so not to strain the servers, but confusingly for you).