Two different tests in the same test class are corrupting each other. The patch I've provided (reproduced from another patch I was working on) shows an example of this.

You can see that the two test classes added are exactly the same, except that the first has an extra test method added in. This causes the test method testBypassNodeAccess to fail in the second test class even though it passes in the first.

CommentFileSizeAuthor
corruptor.patch3.45 KBMike Wacker

Comments

berdir’s picture

Things like that are usually because of a static cache somewhere, I've seen that with permissions. Now that we have drupal_static_reset(), we can resolve this, see #498358: Reset all statics before testing for example.

Mike Wacker’s picture

I tried sticking a call to drupal_static_reset() in the setUp() function, but it didn't seem to work.

catch’s picture

Status: Active » Needs work

Let's see if this breaks.

catch’s picture

Status: Needs work » Needs review

hm.

boombatower’s picture

Status: Needs review » Fixed

It would seem we have fixed this with either static clearing or something else as bot now passes this.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.