camunda / camunda

Distributed Workflow Engine for Microservices Orchestration
https://camunda.com/platform/
3.09k stars 562 forks source link

[Backport stable/8.2] Stabilize `ReplayStateRandomizedPropertyTest` #19447

Open backport-action opened 1 week ago

backport-action commented 1 week ago

Description

Backport of #19393 to stable/8.2.

relates to #14596 original author: @korthout

backport-action commented 1 week ago

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin backport-19393-to-stable/8.2
git worktree add --checkout .worktree/backport-19393-to-stable/8.2 backport-19393-to-stable/8.2
cd .worktree/backport-19393-to-stable/8.2
git reset --hard HEAD^
git cherry-pick -x 412cf2ff6ea8e4a01fea9aa9352de2022076df70 4474e4722fae53a78b63280e199c23341ac55f6a ba2022b65ff401e2c687428adab29058c3adc790 3765c311e30c1a0972ba444eaeef987cfa57f53b 0aeca3b9f323020c88e62c11c47fc38204376557
git push --force-with-lease
korthout commented 1 week ago

I've resolved the conflicts, see 92be9d6 and 670c422.

Interestingly, 8.2 might not be able to test like this, because of the way migration tasks are tracked. Migration tasks are marked as finished at the start of processing I guess, and they are not reproduced during replayed. This requires additional investigation:

Error:    ReplayStateRandomizedPropertyTest.shouldRestoreStateAtEachStepInExecution:79->stopAndRestartEngineAndCompareStates:124 ? ConditionTimeout Condition with alias 'await that the replay state is equal to the processing state' didn't complete within 10 seconds because assertion condition defined as a Lambda expression in io.camunda.zeebe.engine.processing.randomized.ReplayStateRandomizedPropertyTest 
Multiple Failures (1 failure)
-- failure 1 --
[The state column 'MIGRATIONS_STATE' has different entries] 
Expecting map:
  {}
to contain only:
  ["[0, 0, 0, 26, 74, 111, 98, 66, 97, 99, 107, 111, 102, 102, 82, 101, 115, 116, 111, 114, 101, 77, 105, 103, 114, 97, 116, 105, 111, 110]"="{"state":"FINISHED"}",
    "[0, 0, 0, 43, 80, 114, 111, 99, 101, 115, 115, 77, 101, 115, 115, 97, 103, 101, 83, 117, 98, 115, 99, 114, 105, 112, 116, 105, 111, 110, 83, 101, 110, 116, 84, 105, 109, 101, 77, 105, 103, 114, 97, 116, 105, 111, 110]"="{"state":"FINISHED"}",
    "[0, 0, 0, 26, 74, 111, 98, 66, 97, 99, 107, 111, 102, 102, 67, 108, 101, 97, 110, 117, 112, 77, 105, 103, 114, 97, 116, 105, 111, 110]"="{"state":"FINISHED"}",
    "[0, 0, 0, 26, 74, 111, 98, 84, 105, 109, 101, 111, 117, 116, 67, 108, 101, 97, 110, 117, 112, 77, 105, 103, 114, 97, 116, 105, 111, 110]"="{"state":"FINISHED"}",
    "[0, 0, 0, 29, 68, 101, 99, 105, 115, 105, 111, 110, 82, 101, 113, 117, 105, 114, 101, 109, 101, 110, 116, 115, 77, 105, 103, 114, 97, 116, 105, 111, 110]"="{"state":"FINISHED"}",
    "[0, 0, 0, 37, 67, 111, 108, 117, 109, 110, 70, 97, 109, 105, 108, 121, 80, 114, 101, 102, 105, 120, 67, 111, 114, 114, 101, 99, 116, 105, 111, 110, 77, 105, 103, 114, 97, 116, 105, 111, 110]"="{"state":"FINISHED"}",
    "[0, 0, 0, 36, 77, 101, 115, 115, 97, 103, 101, 83, 117, 98, 115, 99, 114, 105, 112, 116, 105, 111, 110, 83, 101, 110, 116, 84, 105, 109, 101, 77, 105, 103, 114, 97, 116, 105, 111, 110]"="{"state":"FINISHED"}",
    "[0, 0, 0, 26, 84, 101, 109, 112, 111, 114, 97, 114, 121, 86, 97, 114, 105, 97, 98, 108, 101, 77, 105, 103, 114, 97, 116, 105, 111, 110]"="{"state":"FINISHED"}",
    "[0, 0, 0, 17, 68, 101, 99, 105, 115, 105, 111, 110, 77, 105, 103, 114, 97, 116, 105, 111, 110]"="{"state":"FINISHED"}"]
but could not find the following map entries:
  ["[0, 0, 0, 26, 74, 111, 98, 66, 97, 99, 107, 111, 102, 102, 82, 101, 115, 116, 111, 114, 101, 77, 105, 103, 114, 97, 116, 105, 111, 110]"="{"state":"FINISHED"}",
    "[0, 0, 0, 43, 80, 114, 111, 99, 101, 115, 115, 77, 101, 115, 115, 97, 103, 101, 83, 117, 98, 115, 99, 114, 105, 112, 116, 105, 111, 110, 83, 101, 110, 116, 84, 105, 109, 101, 77, 105, 103, 114, 97, 116, 105, 111, 110]"="{"state":"FINISHED"}",
    "[0, 0, 0, 26, 74, 111, 98, 66, 97, 99, 107, 111, 102, 102, 67, 108, 101, 97, 110, 117, 112, 77, 105, 103, 114, 97, 116, 105, 111, 110]"="{"state":"FINISHED"}",
    "[0, 0, 0, 26, 74, 111, 98, 84, 105, 109, 101, 111, 117, 116, 67, 108, 101, 97, 110, 117, 112, 77, 105, 103, 114, 97, 116, 105, 111, 110]"="{"state":"FINISHED"}",
    "[0, 0, 0, 29, 68, 101, 99, 105, 115, 105, 111, 110, 82, 101, 113, 117, 105, 114, 101, 109, 101, 110, 116, 115, 77, 105, 103, 114, 97, 116, 105, 111, 110]"="{"state":"FINISHED"}",
    "[0, 0, 0, 37, 67, 111, 108, 117, 109, 110, 70, 97, 109, 105, 108, 121, 80, 114, 101, 102, 105, 120, 67, 111, 114, 114, 101, 99, 116, 105, 111, 110, 77, 105, 103, 114, 97, 116, 105, 111, 110]"="{"state":"FINISHED"}",
    "[0, 0, 0, 36, 77, 101, 115, 115, 97, 103, 101, 83, 117, 98, 115, 99, 114, 105, 112, 116, 105, 111, 110, 83, 101, 110, 116, 84, 105, 109, 101, 77, 105, 103, 114, 97, 116, 105, 111, 110]"="{"state":"FINISHED"}",
    "[0, 0, 0, 26, 84, 101, 109, 112, 111, 114, 97, 114, 121, 86, 97, 114, 105, 97, 98, 108, 101, 77, 105, 103, 114, 97, 116, 105, 111, 110]"="{"state":"FINISHED"}",
    "[0, 0, 0, 17, 68, 101, 99, 105, 115, 105, 111, 110, 77, 105, 103, 114, 97, 116, 105, 111, 110]"="{"state":"FINISHED"}"]
at ReplayStateRandomizedPropertyTest.lambda$assertIdenticalStates$4(ReplayStateRandomizedPropertyTest.java:156).