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 branch inserted by the test is in the database." and "The branch inserted by the test is the only branch in the database." currently fail. I've narrowed this down to the branch delete of refs/heads/enhancements
not being reflected in $this->repo->loadBranches();
. As far as I can tell, the delete does happen in the test repo, but the entity cache of the branch remains.
Comment | File | Size | Author |
---|---|---|---|
#7 | 2181077.diff | 560 bytes | drumm |
Comments
Comment #1
tvn CreditAttribution: tvn commentedComment #2
drummChanging the call in
testBranchOffAndDelete()
fromto
Makes the test succeed, so I think that confirms it is a caching issue.
Comment #3
drummA call to
$this->repository->loadBranches()
inVersioncontrolGitRepositoryHistorySynchronizerDefault::syncEvent()
after theenhancements
branch is deleted does correctly show onlynewbranch
remaining.Maybe it is possible the tests somehow have a different repository object.
Comment #4
drummI confirmed the test and
VersioncontrolGitRepositoryHistorySynchronizerDefault::syncEvent()
have the same repository object. So,enhancements
somehow gets added back by the time the test checks it.Comment #5
drummThe cached repo comes back with
in
VersioncontrolRepository::syncEvent()
. So, whendisableControllerCaching()
becomes active, the cache should still be able to be invalidated.Comment #6
drummThis patch resets the cache when
restoreControllerCachingDefaults()
is called. I think it is best to clear it all since anything could have changed while caching is off.Comment #7
drumm(correct patch)
Comment #9
marvil07 CreditAttribution: marvil07 commentedThanks for the fix!
Added to 7.x-1.x.
Comment #10
drummDeployed to Drupal.org.