cfiles icon indicating copy to clipboard operation
cfiles copied to clipboard

Check Tests

Open luke- opened this issue 1 year ago • 7 comments

It seems that the tests currently fail randomly.

luke- avatar Apr 27 '23 18:04 luke-

@luke- Yes, I confirm it is randomly, because after commit the PR https://github.com/humhub/cfiles/pull/182 tests were broken, and only after re-run they became green. It looks sometimes not enough time to execute, and it always randomly.

yurabakhtin avatar May 31 '23 14:05 yurabakhtin

@yurabakhtin Can you identify which steps has not enough time?

luke- avatar May 31 '23 15:05 luke-

@luke- Today I have re-run the tests of the PR 2 times and they were successful. Then I run them locally:

tests_random_error

The error $I->waitForElement(".disable-module-cfiles") at ..\..\..\humhub\tests\codeception\_support\AcceptanceTester.php:258 is from core module enabling $I->enableModule($guid, 'cfiles').

tests_random_error2

The error 31. $I->waitForText("newFile.txt") at codeception\_support\AcceptanceTester.php:46 because default time is 10 seconds waitForElement($element, $timeout = 10) but I am not sure that we should increase it to 15 or 20 seconds because after that error I could run 4 times locally without error and then again the same error.

Maybe my local server is not enough fast and we just should merge the PR https://github.com/humhub/cfiles/pull/182 and wait when new error will appears.

yurabakhtin avatar Jun 01 '23 10:06 yurabakhtin

@yurabakhtin Ok, thanks. Then lets try it PR 182 is enough. Otherwise we can try to increase the timeout.

luke- avatar Jun 01 '23 14:06 luke-

@luke- After merge the PR I see an error only on PHP 8.1-mysql-5.7-humhub-master - https://github.com/humhub/cfiles/actions/runs/5145542272/jobs/9263314209

I can try to increase a time here https://github.com/humhub/cfiles/blob/master/tests/codeception/_support/AcceptanceTester.php#L137 but not sure we should do this.

yurabakhtin avatar Jun 01 '23 14:06 yurabakhtin

@yurabakhtin Hmm, any other idea instead to increase this timeout?

luke- avatar Jun 01 '23 15:06 luke-

@luke- Sorry, no idea because it looks correctly:

debug

Maybe only if set the second param 10 because the method has the declration public function waitForText($text, $timeout = 10, $selector = NULL).

yurabakhtin avatar Jun 01 '23 16:06 yurabakhtin