This repository was archived by the owner on Oct 5, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,9 @@ tonic = { version = "0.12.1", features = [
34
34
[dev-dependencies ]
35
35
rstest = { version = " 0.22.0" , default-features = false }
36
36
37
+ [features ]
38
+ test_redis = []
39
+
37
40
[build-dependencies ]
38
41
tonic-build = " 0.12.1"
39
42
Original file line number Diff line number Diff line change @@ -151,14 +151,13 @@ pub enum Error {
151
151
Redis ( #[ from] redis:: RedisError ) ,
152
152
}
153
153
154
- #[ cfg( test) ]
154
+ #[ cfg( all ( test, feature = "test_redis" ) ) ]
155
155
mod tests {
156
156
use crate :: sql:: { Query , QueryResponse , UidGetter } ;
157
157
158
158
use super :: RedisCacher ;
159
159
160
160
#[ tokio:: test]
161
- #[ ignore = "requires a running Redis server" ]
162
161
async fn test_cache ( ) {
163
162
let mut conn = create_connection ( 0 ) . await ;
164
163
let mut cacher = RedisCacher :: new ( & mut conn) ;
@@ -189,7 +188,6 @@ mod tests {
189
188
}
190
189
191
190
#[ tokio:: test]
192
- #[ ignore = "requires a running Redis server" ]
193
191
async fn test_cache_not_hit ( ) {
194
192
let mut conn = create_connection ( 1 ) . await ;
195
193
let mut cacher = RedisCacher :: new ( & mut conn) ;
@@ -209,7 +207,6 @@ mod tests {
209
207
}
210
208
211
209
#[ tokio:: test]
212
- #[ ignore = "requires a running Redis server" ]
213
210
async fn test_two_uid_same ( ) {
214
211
let mut conn = create_connection ( 2 ) . await ;
215
212
let mut cacher = RedisCacher :: new ( & mut conn) ;
You can’t perform that action at this time.
0 commit comments