Skip to content

Commit

Permalink
Merge pull request #92 from tucker-bluesage/master
Browse files Browse the repository at this point in the history
Fixing tests
  • Loading branch information
puneetbehl authored Feb 15, 2023
2 parents 296a0b9 + 66e1484 commit f457002
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ dependencies {
console "org.grails:grails-console"

compile 'redis.clients:jedis:4.3.1'
compile 'org.apache.commons:commons-pool2:2.11.1'
compile 'com.google.code.gson:gson:2.9.1'
}

Expand Down
11 changes: 11 additions & 0 deletions src/main/groovy/grails/plugins/redis/RedisService.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,17 @@ class RedisService {
}
}

/**
* Deletes key from redis.
*
* @param key The key to delete.
*/
void deleteKey(String key){
withRedis { Jedis redis ->
redis.del(key)
}
}

def memoizeList(String key, Integer expire, Closure closure) {
memoizeList(key, [expire: expire], closure)
}
Expand Down
10 changes: 2 additions & 8 deletions src/test/groovy/grails/plugins/redis/RedisServiceSpec.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,14 @@ package grails.plugins.redis

import grails.core.GrailsApplication
import grails.spring.BeanBuilder
import grails.test.mixin.integration.Integration
import groovy.util.logging.Slf4j
import grails.testing.mixin.integration.Integration
import org.springframework.beans.factory.annotation.Autowired
import redis.clients.jedis.Jedis
import redis.clients.jedis.Transaction
import redis.clients.jedis.exceptions.JedisConnectionException
import spock.lang.Specification

import java.util.concurrent.Callable
import java.util.concurrent.ConcurrentHashMap
import java.util.concurrent.ConcurrentMap
import java.util.concurrent.CountDownLatch
import java.util.concurrent.ExecutorService
import java.util.concurrent.Executors
import java.util.concurrent.*

import static grails.plugins.redis.RedisService.NO_EXPIRATION_TTL

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package grails.plugins.redis

import grails.core.GrailsApplication
import grails.test.mixin.integration.Integration
import grails.testing.mixin.integration.Integration
import org.springframework.beans.factory.annotation.Autowired
import spock.lang.Ignore
import spock.lang.Specification
Expand Down

0 comments on commit f457002

Please sign in to comment.