Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
phpunit
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
1 Oct 2014 at 04:54 UTC
Updated:
22 Dec 2014 at 07:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
cosmicdreams commentedHere's an example of the change we would have to make, seeing if this passes the tests.
Comment #2
cs_shadow commented@cosmicdreams probably wanted to mark it for review so that the testbot could run.
Comment #3
cs_shadow commentedAttached is a patch that replaces all occurrences of DrupalUnitTestBase with KernelTestBase. It should pass the tests and once it does, we can remove the DrupalUnitTestBase class altogether as a follow-up.
Comment #4
daffie commentedJust a reroll.
and
I did not add interdiff, because it would not be helpfull.
The class DrupalUnitTestBase is not deleted. Need a followup for that.
Comment #5
mile23I think this issue should also remove DrupalUnitTestBase, otherwise we will get false positives for tests which were misses. Also, the testbot itself might need fixing, though I'm pretty sure that's not the case.
The way to evaluate a given patch here is to send two patches to the testbot: One which only makes a minor irrelevant change (such as a comment), and one with the real patch. Then we compare the number of results.
For instance, here's the result count for #4, visible by clicking
[view]next to the patch:If the number of passes match, things are good.
It might be that we could just compare the number of tests against branch, but that would leave us without a record.
Comment #6
mile23Will need a change notice.
Comment #7
mile23Talked with @daffie in IRC and so here's a couple of patches.
One does nothing but add a comment.
The other changes all occurrences of
DrupalUnitTestBasetoKernelTestBaseand also deletesDrupalUnitTestBase.How to do this in NetBeans (and probably other IDEs):
KernelTestBaseto change its name, and all useages. I renamed it toKernelTestBaseReal.DrupalUnitTestBaseto change its name toKernelTestBase.KernelTestBase.php(which used to beDrupalUnitTestBase.php).KernelTestBaseRealto beKernelTestBase.Using a process like this is probably more productive than trying to do a re-roll.
Comment #8
mile23Comment #11
mile23Hmm. Worked locally.
Comment #12
daffie commentedMaybe the problem is #2318755: Block Module: Fix documentation that refers to enabling/disabling of modules. It just landed.
Comment #16
daffie commentedWith my patch files then.
Comment #22
mile23Hmm. Both sets of tests have a discrepancy between the baseline and the changed number. #7 is off by 10, and #16 is off by 4.
Comment #23
daffie commentedI have posted patches for this issue because there were problems with the testbot. To be clear: I am reviewing the patch from comment #7 that was created by Mile23.
The patch replaces all instances of DrupalUnitTestBase with KernelTestBase and deletes the file with the DrupalUnitTestBase class.
The gets the green light from the testbot.
It all looks good to me, So it gets a RTBC from me.
Followup after commit: I think that the testbot needs to remove some code, so that it does looks for test classes of the type DrupalUnitTestBase.
For the commiter: The patch that I reviewed is 2347999_7.patch.
Comment #24
alexpottCan we actually remove this is a separate issue. Just in case a patch gets committed with using DrupalUnitTestBase. If we do it that way we have simpler reverting options.
Comment #25
daffie commented@Mile23: Can you do a new patch. I shall do the review.
Comment #26
mile23OK.
So here are two patches. One does the refactor only, and the other does the refactor and deletes
DrupalUnitTestBase.I included a patch with the deletion so the testbot can confirm it all worked.
Comment #27
daffie commentedThe patch replaces all instances of DrupalUnitTestBase with KernelTestBase.
The DrupalUnitTestBase class does not get deleted.
The gets the green light from the testbot.
It all looks good to me, So it gets a RTBC from me.
For the commiter: The patch that I reviewed is 2347999_26_refactor_only.patch.
Comment #28
alexpottCommitted 0bb57ed and pushed to 8.0.x. Thanks!
Thanks for adding the beta evaluation for to the issue summary.
There was a code comment that needed updating.
Fixed on commit.
Comment #30
mile23Updated change notice here: https://www.drupal.org/node/2271271
Ugh. Jumped the gun.
Comment #31
mile23Follow-up here: #2388043: Remove DrupalUnitTestBase
Comment #32
mile23