This patch to fix the notice error when running the test: testCheckMemoryLimit().

| Comment | File | Size | Author |
|---|---|---|---|
| #16 | 3023066.patch | 1.34 KB | pol |
| Screenshot_2018-12-30 Test result Site name(1).png | 84.8 KB | pol |
This patch to fix the notice error when running the test: testCheckMemoryLimit().

| Comment | File | Size | Author |
|---|---|---|---|
| #16 | 3023066.patch | 1.34 KB | pol |
| Screenshot_2018-12-30 Test result Site name(1).png | 84.8 KB | pol |
Comments
Comment #2
polComment #3
mfbFiltering the memory limit doesn't work as it could be specified in bytes, GB, etc.
Instead, we need to either parse the memory limit using parse_size(), or manually find the size, multiply, and recombine with any unit.
Comment #4
mfbOops that wasn't quite right, because MB was being tacked on to the byte size, which meant that the memory limit was multiplied by 1024 * 1024 * 2 instead of 2 :)
Comment #5
polComment #6
fabianx commentedUnless I miss something the same problem exists in Drupal 8 in this file:
core/tests/Drupal/Tests/Component/Utility/EnvironmentTest.php
It needs to be fixed there first, before we can commit it to Drupal 7.
Comment #7
polThanks for your input Fabian, I will provide a patch for D8 asap as well.
Comment #8
polAn issue for D8 has been created: #3024259: [PHP 7.3] Fix EnvironmentTest::providerTestCheckMemoryLimit() notice.
Comment #9
alexpottAs commented on the D8 issue. On DrupalCi this value is -1 in CLI. So this test is not testing what we think it is. I would replace
$twice_avail_memorywith something absurd like3000000YBComment #10
mfbHahaha I am trying to imagine what is 3,000,000 YB of RAM and have been unable to. That is way beyond the largest supercomputers or the 64-bit architecture limit. If every human being on the planet had like 100 billion smartphones each, then that would get you in the ballpark.
Comment #11
polComment #12
polUpdated patch.
Comment #13
polComment #14
polAll good for me locally!
Comment #15
fabianx commentedLet's sync this with the D8 changes made before committing.
Comment #16
polUpdated patch - just changed the comment, it's now in sync with Drupal 8 comment.
Comment #17
fabianx commentedBack to RTBC
Comment #19
polThanks all !!!