tests: fixed random fails in RadiateTest (wrong MOR predicate code, #9550)

This commit is contained in:
Oleg Agafonov 2023-09-15 06:29:51 +04:00
parent e92031a3bb
commit 6f12d62882
5 changed files with 32 additions and 10 deletions

View file

@ -111,7 +111,7 @@ public class MageObjectReference implements Comparable<MageObjectReference>, Ser
@Override
public int compareTo(MageObjectReference o) {
if (o.getSourceId() == null || this.sourceId == null || Objects.equals(o.getSourceId(), this.sourceId)) {
return o.getZoneChangeCounter() - this.zoneChangeCounter;
return Integer.compare(o.getZoneChangeCounter(), this.zoneChangeCounter);
}
return o.getSourceId().compareTo(sourceId);
}