parent
037221684b
commit
2fbf0f3e11
|
@ -50,6 +50,8 @@ public class DisposeNodeManagerImpl implements DisposeNodeManager {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void loadDisposeNodeFromDB() {
|
public void loadDisposeNodeFromDB() {
|
||||||
|
disposeDevMap.clear();
|
||||||
|
|
||||||
List<DisposeDevice> devList = disposeDeviceMapper.selectAll();
|
List<DisposeDevice> devList = disposeDeviceMapper.selectAll();
|
||||||
|
|
||||||
if (devList == null) {
|
if (devList == null) {
|
||||||
|
|
|
@ -27,8 +27,6 @@ import org.springframework.transaction.annotation.Transactional;
|
||||||
@SpringBootTest
|
@SpringBootTest
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||||
@Transactional
|
|
||||||
@Rollback
|
|
||||||
public class DisposeNodeManagerTest extends InitTestEnvironment {
|
public class DisposeNodeManagerTest extends InitTestEnvironment {
|
||||||
/**
|
/**
|
||||||
* The Used ip addr.
|
* The Used ip addr.
|
||||||
|
@ -61,6 +59,7 @@ public class DisposeNodeManagerTest extends InitTestEnvironment {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void userLogin() {
|
public void userLogin() {
|
||||||
|
disposeNodeManager.loadDisposeNodeFromDB();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -114,8 +113,6 @@ public class DisposeNodeManagerTest extends InitTestEnvironment {
|
||||||
Assert.assertEquals(disposeNodeManager.getAllDisposeDevice().size(), 0);
|
Assert.assertEquals(disposeNodeManager.getAllDisposeDevice().size(), 0);
|
||||||
disposeNodeManager.cleanupDisposeNodeCache();
|
disposeNodeManager.cleanupDisposeNodeCache();
|
||||||
}
|
}
|
||||||
|
|
||||||
disposeNodeManager.loadDisposeNodeFromDB();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -124,7 +121,5 @@ public class DisposeNodeManagerTest extends InitTestEnvironment {
|
||||||
ErrorCode ret = disposeNodeManager.delDisposeDeviceByIp(v.getIpAddr());
|
ErrorCode ret = disposeNodeManager.delDisposeDeviceByIp(v.getIpAddr());
|
||||||
Assert.assertEquals(ret, ErrorCode.ERR_OK);
|
Assert.assertEquals(ret, ErrorCode.ERR_OK);
|
||||||
});
|
});
|
||||||
|
|
||||||
disposeNodeManager.loadDisposeNodeFromDB();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue