Sfoglia il codice sorgente

SONAR-19764 Fix flaky test incorrect_quality_gate_information

tags/10.2.0.77647
Alain Kermis 9 mesi fa
parent
commit
d82fa82f7c

+ 4
- 4
server/sonar-webserver-webapi/src/it/java/org/sonar/server/projectanalysis/ws/SearchActionIT.java Vedi File



assertThat(logTester.getLogs(LoggerLevel.ERROR)) assertThat(logTester.getLogs(LoggerLevel.ERROR))
.extracting(LogAndArguments::getFormattedMsg) .extracting(LogAndArguments::getFormattedMsg)
.containsExactly(
.contains(
format("Incorrect changes : [uuid=%s change=ADDED, branch=master] and [uuid=%s, change=ADDED, branch=master]", changeDto1.getUuid(), changeDto2.getUuid())); format("Incorrect changes : [uuid=%s change=ADDED, branch=master] and [uuid=%s, change=ADDED, branch=master]", changeDto1.getUuid(), changeDto2.getUuid()));
} }




assertThat(logTester.getLogs(LoggerLevel.ERROR)) assertThat(logTester.getLogs(LoggerLevel.ERROR))
.extracting(LogAndArguments::getFormattedMsg) .extracting(LogAndArguments::getFormattedMsg)
.containsExactly("Unknown change FAILED_QUALITY_GATE for eventComponentChange uuid: " + changeDto1.getUuid());
.contains("Unknown change FAILED_QUALITY_GATE for eventComponentChange uuid: " + changeDto1.getUuid());
} }


@Test @Test


assertThat(logTester.getLogs(LoggerLevel.ERROR)) assertThat(logTester.getLogs(LoggerLevel.ERROR))
.extracting(LogAndArguments::getFormattedMsg) .extracting(LogAndArguments::getFormattedMsg)
.containsExactly(
.contains(
format("Too many changes on same project (3) for eventComponentChange uuids : %s,%s,%s", changeDto1.getUuid(), changeDto2.getUuid(), changeDto3.getUuid())); format("Too many changes on same project (3) for eventComponentChange uuids : %s,%s,%s", changeDto1.getUuid(), changeDto2.getUuid(), changeDto3.getUuid()));
} }




assertThat(logTester.getLogs(LoggerLevel.ERROR)) assertThat(logTester.getLogs(LoggerLevel.ERROR))
.extracting(LogAndArguments::getFormattedMsg) .extracting(LogAndArguments::getFormattedMsg)
.containsExactly("Unable to retrieve data from event uuid=E11");
.contains("Unable to retrieve data from event uuid=E11");
} }


@Test @Test

Loading…
Annulla
Salva