We should have a registry_files table which contains the files and their MD5 checksums. If it has not changed then we can skip the rebuilding. Of course, we should lose the DELETE FROM registry query. While creating this table, we should have a 'bundle' column for the next issue. For now, it's the same as the filename.

CommentFileSizeAuthor
#13 registry_tests_broken.patch3.78 KBrecidive
#10 registry_tests_2.patch3.8 KBAnonymous (not verified)
#8 registry_tests.patch3.79 KBAnonymous (not verified)
#7 registry_tests.patch4.52 KBAnonymous (not verified)
#3 registry_tests.patch1.56 KBAnonymous (not verified)

Comments

Anonymous’s picture

first cut at a patch coming soon.

Anonymous’s picture

Title: Make registry rebuild faster and more robust » Write unit tests for registry

changing the focus of this issue. once the registry lands, we'll track writing tests for it with this issue.

Anonymous’s picture

Assigned: Unassigned »
Priority: Normal » Critical
Status: Active » Needs review
StatusFileSize
new1.56 KB

first cut at some tests for the registry.

more coming, but changing to code needs review to get feedback.

chx’s picture

Status: Needs review » Reviewed & tested by the community

Justin, thanks! Very nice trick. We can always do more but this reads OK.

dries’s picture

Status: Reviewed & tested by the community » Needs work

I've committed this. Let's write some more. :-)

chx’s picture

Status: Needs work » Active

There is no code currently.

Anonymous’s picture

Status: Active » Needs review
StatusFileSize
new4.52 KB

patch adds tests for _registry_parse_files.

probably not the cleanest implementation - feedback welcome.

Anonymous’s picture

StatusFileSize
new3.79 KB

chx pointed out some issues with this on #drupal, rerolled to fix.

chx’s picture

Status: Needs review » Reviewed & tested by the community

Yay more registry tests! (if i want to split hairs, I would raise the issue whether fakeMd5 would not be better called fakeMD5 but I am instead happy with the test)

Anonymous’s picture

StatusFileSize
new3.8 KB

updated patch, Md5 --> MD5, no other changes.

boombatower’s picture

Component: base system » tests

Change component is relation to http://drupal.org/node/253744.

dries’s picture

Priority: Critical » Normal
Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

recidive’s picture

Priority: Normal » Critical
Status: Fixed » Needs review
StatusFileSize
new3.78 KB

Patch was commited twice. SimpleTest is broken.

See http://cvs.drupal.org/viewvc.py/drupal/drupal/includes/registry.test?r1=...

Patch to correct this attached.

boombatower’s picture

Status: Needs review » Reviewed & tested by the community

Looks great.

dries’s picture

Status: Reviewed & tested by the community » Fixed

Oops. Fixed.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.