提交 0d0c9edc 编写于 作者: R Rajan 提交者: GitHub

Fix test: testNeedBrokerDataUpdate loadReport considers absolute percentage change only (#464)

上级 70abe6d4
......@@ -363,11 +363,18 @@ public class ModularLoadManagerImplTest {
lastData.setMsgRateIn(0);
assert (!needUpdate.get());
// Minimally test other values to ensure they are included.
// Minimally test other absolute values to ensure they are included.
lastData.getCpu().usage = 100;
lastData.getCpu().limit = 1000;
currentData.getCpu().usage = 106;
currentData.getCpu().limit = 1000;
assert (!needUpdate.get());
// Minimally test other absolute values to ensure they are included.
lastData.getCpu().usage = 100;
lastData.getCpu().limit = 1000;
currentData.getCpu().usage = 206;
currentData.getCpu().limit = 1000;
assert (needUpdate.get());
lastData.setCpu(new ResourceUsage());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册