User tests: Successful: Unsuccessful:
Create subclasses of RuntimeException
to be used for more specific fail conditions in the cache API and implement them:
JCacheExceptionConnecting
when an adapter tries to connect to an external service and failsJCacheExceptionUnsupported
when the requested cache adapter is unsupported (either a class cannot be found or the isSupported()
method checks return falseRemoves the over-eager connection check in the Memcached adapter's isSupported()
method. The reasoning for this has been explained elsewhere.
Marks in the Redis adapter that it will throw Exceptions as of 4.0.
Makes the unit tests catch a connecting exception and skip the test if the platform can't be reached correctly.
In the Memcache(d) adapters null out the connection when throwing a connection exception; this will force the constructor to attempt the connection again if the class is instantiated after the first failure.
The cache API still functions as expected
On a connection failure for Memcache(d) and Redis a JCacheExceptionConnecting
object (subclass of RuntimeException
so no B/C break with existing try/catch code) is thrown
When a cache adapter is not supported a JCacheExceptionUnsupported
object (subclass of RuntimeException
so no B/C break with existing try/catch code) is thrown
N/A
Category | ⇒ | Libraries Unit Tests |
Status | New | ⇒ | Pending |
Labels |
Added:
?
?
|
I'm guessing this needs to be rebased to get the unit test changes, since all of the unit tests are erroring in this PR.
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-09-06 12:15:44 |
Closed_By | ⇒ | wilsonge |
I have tested this item✅ successfully on 267f477
Works as described.
tested with code review + changing the configuration.php
cache_handler
toredis
memcached
(not supported) andblabla
(doesn't exist)This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11583.