Wunderbyte-GmbH / moodle-local_shopping_cart

Other
4 stars 5 forks source link

User credits persists in behat test (potential cache issue) #76

Open semteacher opened 3 weeks ago

semteacher commented 3 weeks ago

The following issue registered for the behat tests:

Image

Image

Analysis show that it caused by:

Image

at this step balance == remainingcredit == 0 but once we tried to set data

Image

by getting data from cache - remainingcredits has been restored to previous value I have tried to fix this way

Image

but it does not work for some reasons...

Potential problem - it could "renew" credits for the same user after being paid back.

Manually I was unable reproduce that case. But I still worried if I missed something during manual tests...

by now - 5 behat tests fails at 1st run because of above issue but than all passed OK during 2nd run...

Image

Temporary decisioin by @georgmaisser: "leave it for now. It's a reminder that we should look into this once again."

PS: I have created a custom step to reset credits cache It works OK and no behat error. But it destroy credit cache explicitly and in test only... So - original issue not solved yet.