#2801 closed enhancement (fixed)
Increased/improved count tests and the issues they uncovered
Reported by: | thebrandonallen | Owned by: | |
---|---|---|---|
Milestone: | 2.6 | Priority: | normal |
Severity: | normal | Version: | trunk |
Component: | Tools | Keywords: | has-patch |
Cc: |
Description
Increased/improved count tests and the issues they uncovered
I spent some time beefing/speeding up our count tests to build a solid base for #1799. While doing this, it made it easier to see where we needed some other fixes.
I’ll be including two patches on this ticket. The first is the tests themselves. The second improves our type casting in the count functions. The latter isn’t of major importance. It doesn’t effect the tests in any way, it’s simply improvements to our type casting I discovered while working on the tests. It’s a nice-to-have, but not omg-sweet-tea.
The tests, as they stand on this ticket will not all pass. For most of the failures, I could have forced them to pass within the individual test, but I chose to track down and fix the actual issues instead. I will post patches on the relevant tickets.
Attachments (2)
Change History (30)
This ticket was mentioned in Slack in #bbpress by netweb. View the logs.
9 years ago
This ticket was mentioned in Slack in #bbpress by jjj. View the logs.
9 years ago
#12
@
9 years ago
In r5741:
Tests: Improved performance of user component count function tests, now 33⅓% faster
Props thebrandonallen. See #2801
In r5766:
Tests: Improved performance and use bbp_clean_post_cache() in topics template counts function tests
Props thebrandonallen. See #2801
Originally committed the above two commits against the wrong ticket
#14
@
9 years ago
So far, I've merged in all the test changes from 2801.diff except the following three:
tests/phpunit/testcases/topics/functions/counts.php
tests/phpunit/testcases/forums/functions/counts.php
tests/phpunit/testcases/common/query.php
I'll get to these in the morning...
#16
@
9 years ago
@thebrandonallen In r5769 I left out a few of the assertions you included in your original patch and the following two:
bbp_bump_topic_reply_count( $t, '1' );
/bbp_bump_topic_reply_count_hidden( $t, '1' );
- I left this one out as the function parameters require this if passed to be an integer
bbp_get_topic_reply_count( $t, true );
/bbp_get_topic_reply_count_hidden( $t, true );
- I left this one out because test is not testing the
bbp_get_topic_reply_count
/bbp_get_topic_reply_count_hidden
functions, the testing of any integer parameters with these functions should only be tested in their own respective function tests
- I left this one out because test is not testing the
#27
@
9 years ago
- Resolution set to fixed
- Status changed from new to closed
Thats everything now done from 2801.01.patch and 2801.02.patch patches except for:
- I didn't add
BBP_Tests_Forums_Functions_Counts::test_bbp_move_topic_counts
because this is already covered inBBP_Tests_Topics_Functions_Topic::test_bbp_move_topic_handler
- I didn't add
BBP_Tests_Forums_Functions_Counts::test_bbp_forum_deleted_topic_counts
because not all post data is removed from from the db for some reason, though this should be fixed by allowing our tests to usebbp_trash_topic()
,bbp_untrash_topic()
,bbp_delete_Topic()
,bbp_trash_reply()
,bbp_untrash_reply()
, andbbp_delete_reply
as these are currently unable to be used in our tests for some reason, including when used by akeymaster
user ¯\_(ツ)_/¯
Marking this now as fixed, for any issues arising please create a new ticket.
Thanks again for all these thebrandonallen :)
Test improvements