diff --git a/src/test/java/redis/clients/jedis/modules/timeseries/TimeSeriesTest.java b/src/test/java/redis/clients/jedis/modules/timeseries/TimeSeriesTest.java index 97f80c96d26..3c23a3cb8f7 100644 --- a/src/test/java/redis/clients/jedis/modules/timeseries/TimeSeriesTest.java +++ b/src/test/java/redis/clients/jedis/modules/timeseries/TimeSeriesTest.java @@ -20,7 +20,6 @@ import redis.clients.jedis.timeseries.*; import redis.clients.jedis.util.KeyValue; -@RunWith(Parameterized.class) public class TimeSeriesTest extends RedisModuleCommandsTestBase { @BeforeClass @@ -33,8 +32,8 @@ public static void prepare() { //// RedisModuleCommandsTestBase.tearDown(); // } - public TimeSeriesTest(RedisProtocol protocol) { - super(protocol); + public TimeSeriesTest() { + super(null); } @Test @@ -291,35 +290,21 @@ public void testAdd() { @Test public void testCreateIgnore() { assertEquals("OK", client.tsCreate("series-ignore", - TSCreateParams.createParams().ignore(5, 2))); + TSCreateParams.createParams().ignore(5, 3))); //System.out.println(client.tsInfo("series-ignore").getProperties()); // doesn't provide IGNORE info client.tsAdd("series-ignore", 0, 0); - System.out.println(client.tsAdd("series-ignore", 100, 20)); // should fail, doesn't fail - // TODO: complete tests - } - - @Test - public void testAlterIgnore() { - assertEquals("OK", client.tsCreate("series-ignore")); - assertEquals("OK", client.tsAlter("series-ignore", - TSAlterParams.alterParams().ignore(5, 2))); - //System.out.println(client.tsInfo("series-ignore").getProperties()); // doesn't provide IGNORE info - - client.tsAdd("series-ignore", 0, 0); - System.out.println(client.tsAdd("series-ignore", 100, 20)); // should fail, doesn't fail - // TODO: complete tests - } - - @Test - public void testAddIgnore() { - assertEquals(0, client.tsAdd("series-ignore", 0, 0, - TSCreateParams.createParams().ignore(5, 2))); - //System.out.println(client.tsInfo("series-ignore").getProperties()); // doesn't provide IGNORE info - - System.out.println(client.tsAdd("series-ignore", 100, 20)); // should fail, doesn't fail - // TODO: complete tests - } + System.out.println(client.tsAdd("series-ignore", 1, 1)); // should be ignored? doesn't get ignored + System.out.println(client.tsGet("series-ignore")); // >> (1:1.0) + System.out.println(client.tsRange("series-ignore", 0, 1000)); // >> [(0:0.0), (1:1.0)] + System.out.println(client.tsInfo("series-ignore").getProperties().get("totalSamples")); // >> 2 + System.out.println(client.tsAdd("series-ignore", 100, 20)); // should be ignored, doesn't get ignored + System.out.println(client.tsGet("series-ignore")); // >> (100:20.0) + System.out.println(client.tsRange("series-ignore", 0, 1000)); // >> [(0:0.0), (1:1.0), (100:20.0)] + System.out.println(client.tsInfo("series-ignore").getProperties().get("totalSamples")); // >> 3 + // TODO: complete test + } + // TODO: more tests from TS.ALTER and TS.ADD instead of TS.CREATE. @Test public void issue75() {