[wp-trac] [WordPress Trac] #35199: WP_UnitTest_Generator_Sequence is generating incorrect sequences

WordPress Trac noreply at wordpress.org
Thu Apr 21 15:56:37 UTC 2016


#35199: WP_UnitTest_Generator_Sequence is generating incorrect sequences
------------------------------+-----------------------
 Reporter:  OddOneOut         |       Owner:
     Type:  defect (bug)      |      Status:  reopened
 Priority:  normal            |   Milestone:  4.6
Component:  Build/Test Tools  |     Version:  4.4
 Severity:  normal            |  Resolution:
 Keywords:                    |     Focuses:
------------------------------+-----------------------
Changes (by boonebgorges):

 * status:  closed => reopened
 * resolution:  invalid =>
 * milestone:   => 4.6


Comment:

 As pointed out by @swissspidy, the new `WP_UnitTest_Generator_Sequence`
 iterator strategy can cause odd problems when running sets of tests that
 run in separate threads, such as AJAX tests. In these cases, the `$incr`
 value can be incremented in ways that are difficult to predict, resulting
 in user insert errors and other weirdness.

 I think it's possible to fix the separate-thread issue as well as some of
 the complaints in the current ticket by altering the incrementor routine
 so that the same incrementor is enforced for a single object. See
 [attachment:35199.diff]. Backward compatibility should be maintained for
 anyone using the `back()` method, though we won't be using it anymore.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35199#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list