mirror of
https://hk.gh-proxy.com/https://github.com/wp-cli/profile-command.git
synced 2025-08-18 06:11:20 +08:00
Drop execution time from cache test
Sometimes this rounds to a non-zero value, which causes tests to fail
This commit is contained in:
parent
e2e54a91cf
commit
138e43d366
1 changed files with 6 additions and 6 deletions
|
@ -26,12 +26,12 @@ Feature: Profile arbitary code execution
|
|||
Scenario: Profile calls to the object cache
|
||||
Given a WP install
|
||||
|
||||
When I run `wp profile eval 'wp_cache_get( "foo" );' --fields=time,cache_hits,cache_misses`
|
||||
When I run `wp profile eval 'wp_cache_get( "foo" );' --fields=cache_hits,cache_misses`
|
||||
Then STDOUT should be a table containing rows:
|
||||
| time | cache_hits | cache_misses |
|
||||
| 0s | 0 | 1 |
|
||||
| cache_hits | cache_misses |
|
||||
| 0 | 1 |
|
||||
|
||||
When I run `wp profile eval 'wp_cache_set( "foo", "bar" ); wp_cache_get( "foo" ); wp_cache_get( "foo" );' --fields=time,cache_hits,cache_misses`
|
||||
When I run `wp profile eval 'wp_cache_set( "foo", "bar" ); wp_cache_get( "foo" ); wp_cache_get( "foo" );' --fields=cache_hits,cache_misses`
|
||||
Then STDOUT should be a table containing rows:
|
||||
| time | cache_hits | cache_misses |
|
||||
| 0s | 2 | 0 |
|
||||
| cache_hits | cache_misses |
|
||||
| 2 | 0 |
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue