I'm not sure if this is actually a bug, because it's just a failing test on a local machine with a specific set-up. So, 'task' for now.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tim.plunkett’s picture

Status: Active » Needs review
FileSize
1.09 KB

Actually, that entire assertion is useless.
It's provides no additional coverage since
$this->assertFalse(drupal_check_memory_limit('30MB', '16MB'), 'drupal_check_memory_limit() returns FALSE with a 16MB upper limit on a 30MB requirement.'); is a couple lines later.

Status: Needs review » Needs work

The last submitted patch, drupal-1630746-1.patch, failed testing.

tim.plunkett’s picture

Duh, I deleted the variable. Also, I'm unsure that this isn't a bug now, since I reread the test and there is:

// The function should always return true if the memory limit is set to -1.
$this->assertTrue(drupal_check_memory_limit($twice_avail_memory, -1), 'drupal_check_memory_limit() returns TRUE when a limit of -1 (none) is supplied');
tim.plunkett’s picture

Status: Needs work » Needs review
FileSize
949 bytes

Duh. The assertion I'm removing is stating that when the memory limit is twice as big, it will always fail. So that's just not true.

tim.plunkett’s picture

Category: task » bug
FileSize
949 bytes
766 bytes

Just reupping the last patch, but also the example of how this breaks.

yurtboy’s picture

tim.plunkett
I could test this for you if you want. What is the best way to test a patch when there is a failed and passed patch. In this case #5 has 2 patches?

tim.plunkett’s picture

The failing patch was intended to fail. So you can test the one named 'commit'.

Keep in mind that this only fixes the test failure, not an actual bug.

ryan.gibson’s picture

Status: Needs review » Reviewed & tested by the community

Okay, this looks good to me! Doesn't look like that assertFalse should be there. Reviewed.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Silly assertions are silly.

Committed and pushed to 8.x. Thanks!

In a quick grep, it didn't seem like this assertion was present in 7.x. Marking fixed.

Status: Fixed » Closed (fixed)

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