Skip to content

Commit

Permalink
polishing
Browse files Browse the repository at this point in the history
  • Loading branch information
sazzad16 committed Sep 23, 2023
1 parent 5884696 commit 1e7d54d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/test/java/redis/clients/jedis/modules/gears/GearsTest.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
package redis.clients.jedis.modules.gears;

import org.junit.After;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;

import redis.clients.jedis.exceptions.JedisDataException;
Expand All @@ -24,7 +22,6 @@

import static org.junit.Assert.*;

//@Ignore
public class GearsTest extends RedisModuleCommandsTestBase {
private static final String BAD_FUNCTION = "All Your Base Are Belong to Us";
private static final int NUMBER_OF_LIBS = 6;
Expand All @@ -35,9 +32,14 @@ public static void prepare() {
RedisModuleCommandsTestBase.prepare();
}

//@Before
@After
public void deleteFunctions() {
@Override
public void tearDown() throws Exception {
deleteFunctions(); // delete functions before closing connections
super.tearDown();
}

protected void deleteFunctions() {
List<GearsLibraryInfo> libraries = client.tFunctionList();
libraries.stream().map(GearsLibraryInfo::getName).forEach(library -> client.tFunctionDelete(library));
}
Expand Down

0 comments on commit 1e7d54d

Please sign in to comment.