next_time已经测试完成

This commit is contained in:
Yun
2025-09-17 17:09:20 +08:00
parent 28359fbf23
commit 0cff7af265
5 changed files with 99 additions and 39 deletions
+23 -23
View File
@@ -181,28 +181,28 @@ func TestCluster_Add(t *testing.T) {
// TODO: verify the job is added to the cluster and can be executed after the specified duration
}
func TestMain(m *testing.M) {
client := redis.NewClient(&redis.Options{
Addr: "127.0.0.1" + ":" + "6379",
Password: "", // no password set
DB: 0, // use default DB
})
if client == nil {
fmt.Println("redis init error")
return
}
// Redis = client
// func TestMain(m *testing.M) {
// client := redis.NewClient(&redis.Options{
// Addr: "127.0.0.1" + ":" + "6379",
// Password: "", // no password set
// DB: 0, // use default DB
// })
// if client == nil {
// fmt.Println("redis init error")
// return
// }
// // Redis = client
}
// }
func TestRedis(t *testing.T) {
fmt.Println("6666")
t.Log("fffff")
// t.Fail()
// t.Error("ffff")
// Redis.Set(context.Background(), "dddd", "dddd", 0)
// str, err := Redis.Get(context.Background(), "dddd").Result()
// fmt.Println("ssss", str, err)
// t.Log(str, err)
// t.Fail()
}
// func TestRedis(t *testing.T) {
// fmt.Println("6666")
// t.Log("fffff")
// // t.Fail()
// // t.Error("ffff")
// // Redis.Set(context.Background(), "dddd", "dddd", 0)
// // str, err := Redis.Get(context.Background(), "dddd").Result()
// // fmt.Println("ssss", str, err)
// // t.Log(str, err)
// // t.Fail()
// }