package cn.cerc.mis.core;

import org.junit.Ignore;
import org.junit.Test;

import cn.cerc.db.redis.Redis;

import static org.junit.Assert.assertEquals;

public class MemcachedTest {

    @Test
    @Ignore
    public void test() {
        String buffKey = "test";
        String value = "OK!";
        Redis.set(buffKey, value, 2);

        Object buffData;
        for (int i = 1; i < 5; i++) {
            buffData = Redis.get(buffKey);
            String msg = String.format("第 %d 次测试", i);
            assertEquals(msg, i <= 2 ? value : null, buffData);
            sleep();
        }
    }

    private void sleep() {
        try {
            Thread.sleep(1005);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}

@@ -20,16 +20,62 @@
 .core;%0A%0A
+import static org.junit.Assert.assertEquals;%0A%0A
 import o
@@ -91,16 +91,16 @@
 Ignore;%0A
-
 import o
@@ -151,54 +151,8 @@
 s;%0A%0A
-import static org.junit.Assert.assertEquals;%0A%0A
 publ
@@ -304,16 +304,21 @@
 edis.set
+Value
 (buffKey
@@ -390,24 +390,24 @@
 %3C 5; i++) %7B%0A
-
             
@@ -426,16 +426,21 @@
 edis.get
+Value
 (buffKey

Update MemcachedTest.java