修改BUG
This commit is contained in:
parent
8143acf453
commit
83fb34d384
|
|
@ -248,6 +248,9 @@ public class TransactionExecutor {
|
||||||
if (callbackConfig.matches(messageBody)) {
|
if (callbackConfig.matches(messageBody)) {
|
||||||
future.complete(InstructionResult.success(messageBody));
|
future.complete(InstructionResult.success(messageBody));
|
||||||
log.debug("收到匹配的回调消息: topic={}", callbackConfig.getTopic());
|
log.debug("收到匹配的回调消息: topic={}", callbackConfig.getTopic());
|
||||||
|
} else {
|
||||||
|
// 不匹配,重置状态,继续等待
|
||||||
|
callbackReceived.set(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -135,7 +135,7 @@ public class SubCommandTest {
|
||||||
|
|
||||||
Thread.sleep(100);
|
Thread.sleep(100);
|
||||||
response = "{\"result\":\"subSuccess\"}";
|
response = "{\"result\":\"subSuccess\"}";
|
||||||
mqttCallbackRegistry.handleMessage("test/" + TEST_SN + "/response", response);
|
mqttCallbackRegistry.handleMessage("test/" + TEST_SN + "/response123", response);
|
||||||
log.info(">>> 模拟发送成功子指令方法回调: {}", response);
|
log.info(">>> 模拟发送成功子指令方法回调: {}", response);
|
||||||
|
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
|
|
|
||||||
|
|
@ -141,7 +141,7 @@ public class TestVendorConfig implements VendorConfig {
|
||||||
|
|
||||||
Transaction complexTransaction = new Transaction("复杂指令树", CommandType.ENTER_DRC_MODE)
|
Transaction complexTransaction = new Transaction("复杂指令树", CommandType.ENTER_DRC_MODE)
|
||||||
.root(complexRoot)
|
.root(complexRoot)
|
||||||
.setTimeout(25000);
|
.setTimeout(10000);
|
||||||
transactionMap.put(CommandType.ENTER_DRC_MODE, complexTransaction);
|
transactionMap.put(CommandType.ENTER_DRC_MODE, complexTransaction);
|
||||||
|
|
||||||
// 9. 指令被拒绝 - canExecute返回false
|
// 9. 指令被拒绝 - canExecute返回false
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue