Hi,
we have ran into some race conditions when developing the "Remove page from recycle bin" tests for the SmartAPI for Management Server.
We do the following:
- Delete Page
- Check if page status is "deleted"/"in recycle bin"
- Remove page from Recycle Bin
Unfortunately, the last case doesn't always work as expected. Although the CMS returns that the page has been deleted and is in the Recycle Bin, we cannot remove the page from the Recycle Bin in about 50% of all tests. If we add a delay of about 2 seconds it seems to work fine.
Does anyone have experience with this behavior? Adding a default delay into that method or just try several times wouldn't be a good solution. Does anyone have an idea to really find out if a page is in the Recycle Bin and can be removed from there?
Thanks,
Hilmar Bunjes