Closed Bug 777621 Opened 12 years ago Closed 12 years ago

Move test_write_tabs_503 into memcached-specific tests

Categories

(Cloud Services Graveyard :: Server: Sync, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: rfkelly, Assigned: rfkelly)

References

Details

(Whiteboard: [qa+])

Attachments

(3 files)

The "test_write_tabs_503" tests specific behaviour of the memcached backend, but it included in the base generic tests for syncstorage. I should move it into the memcached-specific tests so that it gets skipped properly when memcache is not available.
Whiteboard: [qa+]
Moved the relevant tests into TestMemcachedStorage class and cleaned them up a bit.
Naturally, re-jiggering these tests has revealed a bug. The memcached backend cannot lock cache-only collections by taking locks in the database, because those collections don't exist in the database. Instead it must use the cache-based locking mechanism.
Attachment #646403 - Flags: review?(telliott)
Attachment #646401 - Flags: review?(telliott)
Blocks: 765656
Comment on attachment 646403 [details] [diff] [review] patch to fix locking of cache-only collections Is there really not a generic way in python to do _as_list? Seems like that belongs straight in a util lib somewhere.
Attachment #646403 - Flags: review?(telliott) → review+
Comment on attachment 646401 [details] [diff] [review] patch moving the tab-related functional tests The diff made this a little hard to check, but I was unable to spot notable differences between the two. If it's just a move, then r+.
Attachment #646401 - Flags: review?(telliott) → review+
(In reply to Toby Elliott [:telliott] from comment #4) > Comment on attachment 646401 [details] [diff] [review] > patch moving the tab-related functional tests > > The diff made this a little hard to check, but I was unable to spot notable > differences between the two. If it's just a move, then r+. The "for key in self.config.registry" loops that setup/teardown the BadCache have changed slightly. The new one is a lot simpler, because we now know that we've already got a MemcachedStorage instance, rather than having to create a new one.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
(In reply to Toby Elliott [:telliott] from comment #3) > Is there really not a generic way in python to do _as_list? Seems like that > belongs straight in a util lib somewhere. Aha, I see there is a pyramid.settings.aslist function that does the same job. I'll switch over to that.
Attachment #646817 - Flags: review?(telliott)
Attachment #646817 - Flags: review?(telliott) → review+
Verified as fixed with the latest code (just pulled today). Also noting that :telliott just "+"-ed the code review (good timing)
Status: RESOLVED → VERIFIED
Product: Cloud Services → Cloud Services Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: