[ 
https://issues.apache.org/jira/browse/SHINDIG-1059?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

lipeng updated SHINDIG-1059:
----------------------------

    Attachment: CacheMemcacheTest.patch

In function setup, I added conditional statement .
if memcache extionsion dosen't be loaded into php, then throw an exception.
if memcache server doesn;t connected good, throw an exception yet.

code:

protected function setUp() {
  if (!extension_loaded('memcache')) {
    $message = 'memcache requires the memcache extention';
    throw new PHPUnit_Framework_SkippedTestSuiteError($message);
  }
  parent::setUp();
  $this->time = new MockRequestTime();
  $this->cache = Cache::createCache('CacheStorageMemcache', 'TestCache', 
$this->time);
  if (! is_resource($this->cache)) {
    $message = 'memcache server can not connect';
    throw new PHPUnit_Framework_SkippedTestSuiteError($message);
  }
}

> CacheMemcacheTest file depend on php have loaded memchache extension
> --------------------------------------------------------------------
>
>                 Key: SHINDIG-1059
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1059
>             Project: Shindig
>          Issue Type: Test
>          Components: PHP
>            Reporter: lipeng
>             Fix For: trunk
>
>         Attachments: CacheMemcacheTest.patch
>
>
> CacheMemcacheTest file depend on php have loaded memchache extension

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to