瀏覽代碼

HPCC-13921 Update min libmemcached version and add connection exception test

Signed-off-by: James Noss <james.noss@lexisnexis.com>
James Noss 9 年之前
父節點
當前提交
41f04bfd49
共有 3 個文件被更改,包括 12 次插入1 次删除
  1. 1 1
      plugins/memcached/README.md
  2. 3 0
      testing/regress/ecl/key/memcachedtest.xml
  3. 8 0
      testing/regress/ecl/memcachedtest.ecl

+ 1 - 1
plugins/memcached/README.md

@@ -17,7 +17,7 @@ The memcached daemon can be obtained via - [source](http://memcached.org/downloa
 sudo apt-get install memcached
 ```
 
-*Note:* **libmemcached** 0.53 or greater is required to use this plugin as intended. It is advised to use the newest version of **memcached** possible to you.
+*Note:* **libmemcached** 1.0.10 or greater is required to use this plugin as intended. It is advised to use the newest version of **memcached** possible to you.
 
 
 Getting started

+ 3 - 0
testing/regress/ecl/key/memcachedtest.xml

@@ -58,3 +58,6 @@
 <Dataset name='Result 20'>
  <Row><Result_20>false</Result_20></Row>
 </Dataset>
+<Dataset name='Result 21'>
+ <Row><value>Memcached Plugin: Failed connecting to ALL servers. Check memcached on all servers and &quot;memcached -B ascii&quot; not used.</value></Row>
+</Dataset>

+ 8 - 0
testing/regress/ecl/memcachedtest.ecl

@@ -17,6 +17,7 @@
 
 //class=embedded
 //class=3rdparty
+//nothor
 
 IMPORT memcached FROM lib_memcached;
 IMPORT Std;
@@ -105,3 +106,10 @@ SEQUENTIAL(
     memcached.Delete('testDelete', servers, 'hashWithThis');
     memcached.Exists('testDelete', servers, 'hashWithThis');
     );
+
+//Test failure to connect
+STRING downServer := '--SERVER=127.0.0.1:6379';
+    ds := DATASET(NOFOLD(1), TRANSFORM({STRING value}, SELF.value := memcached.GetString('connectionTest', downServer)));
+SEQUENTIAL(
+    OUTPUT(CATCH(ds, ONFAIL(TRANSFORM({ STRING value }, SELF.value := FAILMESSAGE))));
+    );