test(return): cover isolation and concurrency; fix receipt and packing races

This commit is contained in:
2026-09-15 17:05:07 +08:00
parent 28fa2a001d
commit 6b0de57a4b
18 changed files with 635 additions and 40 deletions
@@ -64,7 +64,8 @@ class RelabelDocumentServiceTest {
service.downloadFile("101","RL-1","TOTAL",null,99L);
verify(files).download("101","OVERSEAS_RELABEL_TOTAL_DOCUMENT","11",99L);
assertThatThrownBy(()->service.downloadFile("101","RL-1","TOTAL",null,98L)).hasMessageContaining("未绑定");
assertThatThrownBy(()->service.downloadFile("101","RL-1","other",null,99L)).hasMessageContaining("资料范围");
assertThatThrownBy(()->service.downloadFile("101","RL-1","other",null,99L))
.isInstanceOfSatisfying(ResponseStatusException.class, error -> assertThat(error.getStatusCode().value()).isEqualTo(400));
assertThatThrownBy(()->service.downloadFile("101","RL-1","ITEM",null,99L)).hasMessageContaining("指定明细");
verifyNoMoreInteractions(files);
}