Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/135-flaky-regressions-due-to-rea…
Browse files Browse the repository at this point in the history
…ch-the-max-number-of-threads-with-fullteaching-test-suite' into 135-flaky-regressions-due-to-reach-the-max-number-of-threads-with-fullteaching-test-suite
  • Loading branch information
augustocristian committed Aug 16, 2024
2 parents de4f04f + 35d35ad commit 585d403
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,9 @@
<!-- Plugins -->

<build>
<!-- Temporal patch, comment this to avoid unexpected behaviour -->
<!-- To avoid problems with concurrency we change the directories of the reports and outputs -->
<testOutputDirectory>${basedir}/target/test-classes/${dirtarget}</testOutputDirectory>

<outputDirectory>${basedir}/target/classes/${dirtarget}</outputDirectory>
<plugins>
<!-- Jacoco Plugin for Jesus -->
<plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,10 @@ static void setupAll() { // 28 lines

@BeforeEach
void setup(TestInfo info) { //65 lines
log.info("##### Start test: {}" , info.getDisplayName());
log.info("##### Start test: {}" , info.getTestMethod().get().getName());
TJOB_NAME = System.getProperty("dirtarget");

teacher = setupBrowser("chrome", TJOB_NAME + "_" + info.getDisplayName(), "Teacher", WAIT_SECONDS);
teacher = setupBrowser("chrome", TJOB_NAME + "_" + info.getTestMethod().get().getName(), "Teacher", WAIT_SECONDS);

driver = teacher.getDriver();

Expand Down Expand Up @@ -157,9 +157,9 @@ protected BrowserUser setupBrowser(String browser, String testName,
}

@AfterEach
void tearDown(TestInfo testInfo) { //13 lines
void tearDown(TestInfo info) { //13 lines
if (this.teacher != null) {
log.info("##### Finish test: {} - Driver {}", testInfo.getDisplayName(), this.teacher.getDriver());
log.info("##### Finish test: {} - Driver {}", info.getTestMethod().get().getName(), this.teacher.getDriver());
log.info("Browser console at the end of the test");
LogEntries logEntries = teacher.getDriver().manage().logs().get(BROWSER);
logEntries.forEach(entry -> log.info("[{}] {} {}",
Expand All @@ -173,7 +173,7 @@ void tearDown(TestInfo testInfo) { //13 lines
}

if (this.student != null) {
log.info("##### Finish test: {} - Driver {}", testInfo.getDisplayName(), this.student.getDriver());
log.info("##### Finish test: {} - Driver {}", info.getTestMethod().get().getName(), this.student.getDriver());
log.info("Browser console at the end of the test");
LogEntries logEntries = student.getDriver().manage().logs().get(BROWSER);
logEntries.forEach(entry -> log.info("[{}] {} {}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class ChromeUser extends BrowserUser {
public ChromeUser(String userName, int timeOfWaitInSeconds, String testName, String userIdentifier) {
super(userName, timeOfWaitInSeconds);
log.info("Starting the configuration of the web browser");
log.debug(String.format("The Test names are: %s", testName));
log.debug(String.format("The Test name is: %s", testName));

LoggingPreferences logPrefs = new LoggingPreferences();
logPrefs.enable(BROWSER, ALL);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ public static Stream<Arguments> data() throws IOException {
* This test is a simple logging acknowledgement, that checks if the current logged user
* was logged correctly
*/


@Resource(resID = "LoginService", replaceable = {})
@AccessMode(resID = "LoginService", concurrency = 10, sharing = true, accessMode = "READONLY")
@Resource(resID = "OpenVidu", replaceable = {"OpenViduMock"})
Expand Down

0 comments on commit 585d403

Please sign in to comment.