Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The patch at https://drupal.org/node/2140433 in #39 should have had 2 fails, but only had 1.
Locally run-tests.sh failed to actually run the test method in MTimeProtectedFileStorageTest, but runnint it with phpunit I saw an additional failure.
Note: This is actually a phpunit "issue":
that it won't discover a test that's a subclass of another concrete test
Comment | File | Size | Author |
---|---|---|---|
#14 | interdiff-2202611-14.txt | 1.15 KB | damiankloip |
#14 | 2202611-14.patch | 10.09 KB | damiankloip |
Comments
Comment #1
pwolanin CreditAttribution: pwolanin commentedComment #2
damiankloip CreditAttribution: damiankloip commentedThis is a problem with test discovery and PHPUnit. I am guess you could run the test fine in isolation, but running the whole suite would probably not run this test. Simpletest just uses PUPUnit's discovery mechanism to find the test classes anyway...
So, I think we just move what's in MTimeProtectedFileStorageTest into the abstract PhpStorageTestBase class, and make both MTimeProtectedFastFileStorageTest and MTimeProtectedFileStorageTest extend that instead of MTimeProtectedFastFileStorageTest extending MTimeProtectedFileStorageTest.
This should now get discovered and run just fine.
Comment #4
damiankloip CreditAttribution: damiankloip commentedOops, sorry. We need to introduce another base class for the MTimeProtected* classes instead. This can't all live in PhpStorageTestBase as the simple file storage test uses this too.
Let's also introduce a MTimeProtectedFileStorageBase class.
Comment #5
pwolanin CreditAttribution: pwolanin commentedIt would be clearer if you posted the patch using git diff --no-renames
Comment #6
damiankloip CreditAttribution: damiankloip commentedReally?! Not really worth the effort IMO (This is a pretty simple patch) but OK. There you go.
Comment #7
pwolanin CreditAttribution: pwolanin commented6: 2202611-6.patch queued for re-testing.
Comment #8
pwolanin CreditAttribution: pwolanin commentedre-roll for conflict from #2140433: Port SA-CORE-2013-003 to Drupal 8, plus doxygen and other minor cleanup.
Comment #9
damiankloip CreditAttribution: damiankloip commentedWhere's the interdiff?
Also, you ask for the patch with no renames. Then don't review it anyway...
Comment #10
pwolanin CreditAttribution: pwolanin commented@damiankloip - I did review the #6 patch when I re-tested it, but then saw the conflict before I posted my comment.
The interdiff would just be fixing the @file doxygen, and removing the duplicated line:
that was in the new base class setup() method.
In terms of review.
I tested after re-rolling. scripts/run-tests.sh now finds both tests as expected.
Comment #11
damiankloip CreditAttribution: damiankloip commentedOk, thanks for confirming. So now we just get someone else to rtbc and we're good to go.
Comment #12
dawehnerIt would be great to use the proper visibility here.
Comment #13
dawehnerComment #14
damiankloip CreditAttribution: damiankloip commentedRight on!
Comment #15
dawehnerThank you!
Can someone please open an issue on the testbot + drupal to not execute phpunit tests via the UI/run-tests.sh anymore?
Yeah just wanted to force someone to work on that.
Comment #16
catchThat's already open #2189317: Get a PHPUnit job type running that is separate and independent from the Simpletest Job type, fix the d.o integration so that we can run the PHPUnit tests independently.
Committed/pushed this one to 8.x, thanks!