dongyukun
2024-12-31 6eeac9efdb16f92d19536bf23a2d1471705fe752
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package com.xxl.job.admin.dao;
 
import com.xxl.job.admin.core.model.XxlJobRegistry;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
 
import javax.annotation.Resource;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
 
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
public class XxlJobRegistryDaoTest {
 
    @Resource
    private XxlJobRegistryDao xxlJobRegistryDao;
 
    @Test
    public void test(){
        int ret = xxlJobRegistryDao.registryUpdate("g1", "k1", "v1", new Date());
        if (ret < 1) {
            ret = xxlJobRegistryDao.registrySave("g1", "k1", "v1", new Date());
        }
 
        List<XxlJobRegistry> list = xxlJobRegistryDao.findAll(1, new Date());
 
        int ret2 = xxlJobRegistryDao.removeDead(Arrays.asList(1));
    }
 
}