(int oldAccess)
| 242 | } |
| 243 | |
| 244 | private void verifyMemory(int oldAccess) { |
| 245 | var retreat = _tMemoryRetreat.getOrAdd(1L); |
| 246 | if (retreat.getAttack() != oldAccess) |
| 247 | throw new RuntimeException("memoryRetreat error oldAccess=" + retreat.getAttack() + ":" + oldAccess); |
| 248 | retreat.setAttack(oldAccess + 1); |
| 249 | |
| 250 | // 下面两种情况不做严格测试了,有点麻烦,大概率没什么问题。 |
| 251 | // 简单访问一下,意思意思。 |
| 252 | // 1. 热更后切换为后端数据库存储,数据是以前写的时候存在的。 |
| 253 | var memoryToNormal = _tMemoryToNormal.getOrAdd(1L); |
| 254 | if (0 != memoryToNormal.getAttack()) |
| 255 | throw new RuntimeException("memoryToNormal error oldAccess=" + memoryToNormal.getAttack() + ":" + oldAccess); |
| 256 | // 2. 热更后切换为内存表,并且初始是空的。 |
| 257 | var normalToMemory = _tNormalToMemory.getOrAdd(1L); |
| 258 | if (0 != normalToMemory.getAttack()) |
| 259 | throw new RuntimeException("normalToMemory error oldAccess=" + normalToMemory.getAttack() + ":" + oldAccess); |
| 260 | } |
| 261 | |
| 262 | public void verifyOnlineUserData(int oldAccess) { |
| 263 | if (roleId == 0) |
no test coverage detected