git-machete-intellij-plugin: `skipNonExistentBranches_...` UI test failing: unexpected branch in the refreshed table model, due to autodiscover
That’s something new at least 😆
com.virtuslab.gitmachete.uitest.UITestSuite > skipNonExistentBranches_toggleListingCommits_slideOutRoot FAILED
java.lang.AssertionError: expected:<List(allow-ownership-link, build-chain, call-ws, develop, hotfix/add-trigger, master, update-icons)> but was:<ArraySeq(allow-ownership-link, build-chain, call-ws, develop, drop-constraint, hotfix/add-trigger, master, update-icons)>
at org.junit.Assert.fail(Assert.java:88)
at org.junit.Assert.failNotEquals(Assert.java:834)
at org.junit.Assert.assertEquals(Assert.java:118)
at org.junit.Assert.assertEquals(Assert.java:144)
at com.virtuslab.gitmachete.uitest.UITestSuite.skipNonExistentBranches_toggleListingCommits_slideOutRoot(UITestSuite.scala:88)
It’s strange… drop-constraint
appears in refreshed model.
But it’s not added to machete file in the first place, nor later by overwrite.
The only way I see it is that the branch has been automatically rediscovered but that should not take place by refresh, am I right? Or do you see any other options?
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 16 (1 by maintainers)
Commits related to this issue
- Provide a workaround for spurious #979 — committed to VirtusLab/git-machete-intellij-plugin by PawelLipski 2 years ago
But still - markDirtyAndRefresh takes
async
param… we must be carefulI am looking around
GitMacheteRepositoryUpdateBackgroundable
- I am wondering if the next linescan be executed before the backgroundable finishes 🤔
I have the other suspect. The logic seems to be good however there is some race condition (I think I found the place but now the tests pass xd).
Another interesting observation - looking quickly into the CI runs it happens that this error occurs only on the first build run 🤣 every time I rerun workflow from CI it passes. It seems that the CI must be triggered by push xd
https://app.circleci.com/pipelines/github/VirtusLab/git-machete-intellij-plugin/6059/workflows/a72a622d-3d40-45b0-bcac-a6ab9345d2eb/jobs/6398/parallel-runs/0/steps/0-109
I used good old
println
(along with logger debug) - autodiscover happens indeed!again: https://app.circleci.com/pipelines/github/VirtusLab/git-machete-intellij-plugin/5660/workflows/14ee6947-b657-40a2-bcaf-98506b09f1a4/jobs/5974 and again: https://app.circleci.com/pipelines/github/VirtusLab/git-machete-intellij-plugin/5662/workflows/8494a0f1-eb08-4bda-8893-4c9974f3029f/jobs/5976