Skip to content

Fix test inconsistency#2627

Merged
ozh merged 19 commits intomasterfrom
issue2621again
Mar 31, 2020
Merged

Fix test inconsistency#2627
ozh merged 19 commits intomasterfrom
issue2621again

Conversation

@ozh
Copy link
Copy Markdown
Member

@ozh ozh commented Mar 24, 2020

Simplify logic of tests in NextDecimal_Tests to only test what is supposed to be tested.

(Replaces #2626 because I'm a git noob)

Should fix #2621

Simplify logic of tests in NextDecimal_Tests to only test what is supposed to be tested.
Should fix #2621
@ozh
Copy link
Copy Markdown
Member Author

ozh commented Mar 24, 2020

Well at least now it's consistent ....

@ozh
Copy link
Copy Markdown
Member Author

ozh commented Mar 24, 2020

30 000 tests on my dev box, cannot reproduce. FML.

@LeoColomb LeoColomb self-requested a review March 24, 2020 17:31
@ozh
Copy link
Copy Markdown
Member Author

ozh commented Mar 27, 2020

So, still haven't found the specific issue with these two tests. I've improved things here and there in the process of searching I think, so in the end if we drop this PR make sure we still cherry pick useful commits.

ozh added 2 commits March 28, 2020 12:11
@ozh
Copy link
Copy Markdown
Member Author

ozh commented Mar 28, 2020

So. I'm out of ideas. Still no clue why this happens sometimes, and not being able to reproduce on my machine despite the thousands of tests doesn't help.

I think I'm just going to remove these tests and live with it :-)

@ozh
Copy link
Copy Markdown
Member Author

ozh commented Mar 29, 2020

More random inconsistency with phpunit --repeat : sometimes I have a failure on \tests\tests\utilities\get_request.php:111

GetRequest_Tests::test_get_request with data set #32 ('MiXeD', 'http://SHO.rt/', '/MiXeD')
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'MiXeD'
+'mixed'

Yet this test is absolutely DB or option or whatever independent. Djeezus.

@ozh
Copy link
Copy Markdown
Member Author

ozh commented Mar 31, 2020

Meeeeh. I think I've found.

@LeoColomb
Copy link
Copy Markdown
Member

What a suspens! What was the cause?

ozh added 3 commits March 31, 2020 17:09
Duuuuuuuh. Of feckin' course using real plugins will modify YOURLS behavior, hence will affect unit tests... dumb.jpg
@ozh
Copy link
Copy Markdown
Member Author

ozh commented Mar 31, 2020

@LeoColomb testing the next shorturl id was failing when the previously loaded plugin was "random-shorturl". Captain Obvious to the rescue. The whole "let's load a real plugin to test the plugin API" was so dumb it's appalling in retrospective :)

@ozh ozh merged commit 84c48cd into master Mar 31, 2020
@ozh ozh deleted the issue2621again branch March 31, 2020 16:00
@LeoColomb
Copy link
Copy Markdown
Member

Nice one! 🎉 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tests inconsistency in group utils

2 participants