Terminal will be reused by tasks, press any key to close it.怎么解决
时间: 2024-05-04 21:22:06 浏览: 317
这条信息是告诉你当前的终端窗口将被其他任务重用,按任意键即可关闭窗口。如果你想要保留窗口并继续使用它,可以尝试在命令行后面加上 `&` 符号,将命令放在后台运行,例如:
```
command &
```
这样就可以避免窗口被重用了。另外,如果你使用的是某个 IDE 或者编辑器,在设置里面也可能有类似的选项可以控制是否自动关闭终端窗口。
相关问题
给这个方法添加单元测试: public List<MessageDetails> processTrade(CisTStpTradeData tradeData) throws CisTStpException { List<T> viewList = getTradeData(tradeData.getTradeId()); log.info("Size of Object fetched for CIS Trade id {} is {} ", tradeData.getTradeId(), viewList.size()); if(!validateRequest(viewList)){ log.info("Not a valid data to process...."); return null; } Map<String, List<T>> viewAsMap = getViewAsMap(viewList); List<MessageDetails> msgDetailsListAllLegs = new ArrayList<>(); /Process REPO Leg first/ CisRefScbmlEvents reUseRefEvent = null; if(viewAsMap != null && viewAsMap.size() > 0 && viewAsMap.containsKey(TradeLegs.REPO_LEG.getValue())){ log.info("REPO Leg identified in the package"); Map<String, List<T>> repoViewAsMap = viewAsMap.entrySet().stream().filter(p -> p.getKey().equals(TradeLegs.REPO_LEG.getValue())).collect(Collectors.toMap(x -> x.getKey(), x -> x.getValue())); processAllMsgDetail(repoViewAsMap, tradeData, msgDetailsListAllLegs, null); log.info("Event will be reused for other LEGS in package"); if(msgDetailsListAllLegs != null && msgDetailsListAllLegs.size() > 0 && msgDetailsListAllLegs.get(0).getEventDetails() != null){ reUseRefEvent = msgDetailsListAllLegs.get(0).getEventDetails().getRefEvent(); log.info("REPO Event to be reused for other legs is : {} ", reUseRefEvent); } log.info("REPO Leg processed and removed from Map"); viewAsMap.remove(TradeLegs.REPO_LEG.getValue()); } /*Process SCF leg */ if(viewAsMap != null && viewAsMap.size() > 0 && viewAsMap.containsKey(TradeLegs.SCF_LEG.getValue())){ log.info("SCF Leg identified in the package"); Map<String, List<T>> repoViewAsMap = viewAsMap.entrySet().stream().filter(p -> p.getKey().equals(TradeLegs.SCF_LEG.getValue())).collect(Collectors.toMap(x -> x.getKey(), x -> x.getValue())); processAllMsgDetail(repoViewAsMap, tradeData, msgDetailsListAllLegs, null); log.info("SCF Leg processed and removed from Map"); viewAsMap.remove(TradeLegs.SCF_LEG.getValue()); } /Process NON REPO and other CIS and SIP Legs After it. This is done to reuse the Event identified for REPO above for same package/ processAllMsgDetail(viewAsMap, tradeData, msgDetailsListAllLegs, reUseRefEvent); return msgDetailsListAllLegs; }
Here is an example of a JUnit test for the given method:
```
import org.junit.Test;
import static org.junit.Assert.*;
public class TradeProcessorTest {
@Test
public void testProcessTrade() throws CisTStpException {
// Create a mock CisTStpTradeData object
CisTStpTradeData tradeData = new CisTStpTradeData();
tradeData.setTradeId("123");
// Create a mock list of trade data objects
List<T> viewList = new ArrayList<T>();
viewList.add(new TradeDataObject());
// Create a mock TradeProcessor object
TradeProcessor tradeProcessor = new TradeProcessor();
// Call the method under test
List<MessageDetails> result = tradeProcessor.processTrade(tradeData);
// Verify that the result is not null
assertNotNull(result);
// Verify that the result is of the expected size
assertEquals(1, result.size());
}
}
```
This test creates a mock `CisTStpTradeData` object and a mock list of trade data objects, and then calls the `processTrade` method on a mock `TradeProcessor` object. It then verifies that the result is not null and is of the expected size.
You can add more test cases to cover different scenarios and edge cases.
remote: Enumerating objects: 11, done. remote: Counting objects: 100% (11/11), done. remote: Compressing objects: 100% (6/6), done. remote: Total 6 (delta 5), reused 0 (delta 0), pack-reused 0 Unpacking objects: 100% (6/6), 457 bytes | 6.00 KiB/s, done. From https://gitee.com/zwunm/houtai 34fc395..693e350 master -> origin/master hint: Waiting for your editor to close the file...
这是 Git 在进行 Pull 操作时,如果需要进行 Merge 或者 Rebase 操作,会打开一个编辑器,让你填写 Merge 或者 Rebase 的 Commit Message,等待你编辑完毕并保存后,才会进行下一步操作。你可以编辑 Commit Message,然后保存并退出编辑器,Git 就会自动进行下一步操作。如果不想编辑 Commit Message,可以将其留空并直接保存退出编辑器。
阅读全文