()
| 46 | } |
| 47 | |
| 48 | public void close() { |
| 49 | for (var dbh2 : raftNodes) { |
| 50 | try { |
| 51 | dbh2.close(); |
| 52 | } catch (IOException e) { |
| 53 | throw new RuntimeException(e); |
| 54 | } |
| 55 | // 这个测试不持久化,为了不影响其他测试(可能使用相同的配置),运行结束删除持久化的目录。 |
| 56 | LogSequence.deleteDirectory(new File(dbh2.getRaft().getRaftConfig().getDbHome())); |
| 57 | } |
| 58 | try { |
| 59 | agent.close(); |
| 60 | } catch (Exception e) { |
| 61 | throw new RuntimeException(e); |
| 62 | } |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | @Test |
no test coverage detected