"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 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 theenhancementsbranch is deleted does correctly show onlynewbranchremaining.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,enhancementssomehow 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 commentedThanks for the fix!
Added to 7.x-1.x.
Comment #10
drummDeployed to Drupal.org.