提交 525cf739 编写于 作者: Z Zoltan Palfi 提交者: mergify[bot]

Fixing flaky test by removing checking the order (#2958)

上级 2705461b
/* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
......@@ -1433,18 +1433,15 @@ public class TaskServiceTest extends PluggableActivitiTestCase {
assertNotNull(historicActivitiInstance);
List<HistoricDetail> resultSet = historyService.createHistoricDetailQuery().variableUpdates().activityInstanceId(historicActivitiInstance.getId())
.orderByTime().asc().list();
assertEquals(2,
resultSet.size());
assertEquals("variable1",
((HistoricVariableUpdate) resultSet.get(0)).getVariableName());
assertEquals("value1",
((HistoricVariableUpdate) resultSet.get(0)).getValue());
assertEquals("variable1",
((HistoricVariableUpdate) resultSet.get(1)).getVariableName());
assertEquals("value2",
((HistoricVariableUpdate) resultSet.get(1)).getValue());
.list();
assertThat(resultSet).hasSize(2);
assertThat(resultSet)
.extracting(h -> ((HistoricVariableUpdate) h).getValue())
.containsExactlyInAnyOrder("value1", "value2");
assertThat(resultSet)
.extracting(h -> ((HistoricVariableUpdate) h).getVariableName())
.containsOnly("variable1");
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册