From b4ad7697b7ff4d289a2269838c8263a584bb339c Mon Sep 17 00:00:00 2001 From: Jonathan Leibiusky Date: Sun, 30 Jan 2011 17:11:41 -0300 Subject: [PATCH] remove since it was deprecated --- .../tests/JedisNewCommandsCheckTest.java | 72 ------------------- 1 file changed, 72 deletions(-) delete mode 100644 src/test/java/redis/clients/jedis/tests/JedisNewCommandsCheckTest.java diff --git a/src/test/java/redis/clients/jedis/tests/JedisNewCommandsCheckTest.java b/src/test/java/redis/clients/jedis/tests/JedisNewCommandsCheckTest.java deleted file mode 100644 index ec3f32c..0000000 --- a/src/test/java/redis/clients/jedis/tests/JedisNewCommandsCheckTest.java +++ /dev/null @@ -1,72 +0,0 @@ -package redis.clients.jedis.tests; - -import java.io.BufferedInputStream; -import java.io.DataInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.net.MalformedURLException; -import java.net.URL; -import java.util.HashSet; -import java.util.Set; - -import org.junit.Assert; -import org.junit.Test; - -import redis.clients.jedis.Protocol.Command; - -public class JedisNewCommandsCheckTest extends Assert { - @Test - public void checkJedisIsUpdated() throws IOException { - String[] commands = getAvailableCommands(); - Set implementedCommands = getImplementedCommands(); - - Set missingCommands = new HashSet(); - for (String command : commands) { - if (!implementedCommands.contains(command.trim())) { - missingCommands.add(command); - } - } - - if (!missingCommands.isEmpty()) { - fail("There are missing commands: " + missingCommands.toString()); - } - } - - private Set getImplementedCommands() { - // Method[] methods = Jedis.class.getDeclaredMethods(); - // Set implementedCommands = new HashSet(); - // for (Method method : methods) { - // implementedCommands.add(method.getName().trim().toLowerCase()); - // } - // - // methods = JedisPubSub.class.getDeclaredMethods(); - // for (Method method : methods) { - // implementedCommands.add(method.getName().trim().toLowerCase()); - // } - // - // methods = Transaction.class.getDeclaredMethods(); - // for (Method method : methods) { - // implementedCommands.add(method.getName().trim().toLowerCase()); - // } - // implementedCommands.add("config"); - // return implementedCommands; - Set implementedCommands = new HashSet(); - for (Command cmd : Command.values()) { - implementedCommands.add(cmd.name().toLowerCase()); - } - return implementedCommands; - } - - private String[] getAvailableCommands() throws MalformedURLException, - IOException { - URL url = new URL("http://dimaion.com/redis/master"); - InputStream openStream = url.openStream(); - DataInputStream dis = new DataInputStream(new BufferedInputStream( - openStream)); - byte[] all = new byte[dis.available()]; - dis.readFully(all); - String commandList = new String(all); - String[] commands = commandList.split("\n"); - return commands; - } -}