From d64f2933e529ed05adc9a6d4f2b02a3041fcdd85 Mon Sep 17 00:00:00 2001 From: helkv Date: Tue, 12 Mar 2019 12:48:21 +0100 Subject: [PATCH] #40 Reinsert Restarting the driver -> Restarting the webdriver (firefox) in CreateSubcollectionsTest and the data driven tests should prevent Firefox/Jenkins crashing - Reinsert Restarting the firefox drive before each data driven test - Restarting the firefox drive before CreateSubcollectionsTest --- .../scripts/statements/CreateDefaultStatementPrivate.java | 3 +-- .../scripts/statements/CreateDefaultStatementTest.java | 3 +-- src/test/scripts/statements/CreateNewStatementPrivate.java | 3 +-- src/test/scripts/statements/CreateNewStatementTest.java | 3 +-- .../scripts/subcollections/CreateSubcollectionsTest.java | 7 +++++++ 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/test/scripts/statements/CreateDefaultStatementPrivate.java b/src/test/scripts/statements/CreateDefaultStatementPrivate.java index 97b411d..899ea25 100644 --- a/src/test/scripts/statements/CreateDefaultStatementPrivate.java +++ b/src/test/scripts/statements/CreateDefaultStatementPrivate.java @@ -141,9 +141,8 @@ public CreateDefaultStatementPrivate(String type, String statementName, String i @BeforeClass public void resetDriver() { - //FIXME: Restarting the bowser leads to a crash on Jenkins // Restart the browser to prevent Firefox from crashing (see Ticket #40 'Firefox memory leak') -// restartDriver(); + restartDriver(); } /** diff --git a/src/test/scripts/statements/CreateDefaultStatementTest.java b/src/test/scripts/statements/CreateDefaultStatementTest.java index c56669b..447fcb8 100644 --- a/src/test/scripts/statements/CreateDefaultStatementTest.java +++ b/src/test/scripts/statements/CreateDefaultStatementTest.java @@ -146,9 +146,8 @@ public CreateDefaultStatementTest(String type, String statementName, String isPr @BeforeClass public void resetDriver() { - //FIXME: Restarting the bowser leads to a crash in Jenkins // Restart the browser to prevent Firefox from crashing (see Ticket #40 'Firefox memory leak') -// restartDriver(); + restartDriver(); } /** diff --git a/src/test/scripts/statements/CreateNewStatementPrivate.java b/src/test/scripts/statements/CreateNewStatementPrivate.java index eb37d50..f1d7951 100644 --- a/src/test/scripts/statements/CreateNewStatementPrivate.java +++ b/src/test/scripts/statements/CreateNewStatementPrivate.java @@ -141,9 +141,8 @@ public CreateNewStatementPrivate(String type, String statementName, String isPre @BeforeClass public void resetDriver() { - //FIXME: Restarting the bowser leads to a crash on Jenkins // Restart the browser to prevent Firefox from crashing (see Ticket #40 'Firefox memory leak') -// restartDriver(); + restartDriver(); } /** diff --git a/src/test/scripts/statements/CreateNewStatementTest.java b/src/test/scripts/statements/CreateNewStatementTest.java index c2b203c..cf1a899 100644 --- a/src/test/scripts/statements/CreateNewStatementTest.java +++ b/src/test/scripts/statements/CreateNewStatementTest.java @@ -141,9 +141,8 @@ public CreateNewStatementTest(String type, String statementName, String isPredef @BeforeClass public void resetDriver() { - //FIXME: Restarting the bowser leads to a crash on Jenkins // Restart the browser to prevent Firefox from crashing (see Ticket #40 'Firefox memory leak') -// restartDriver(); + restartDriver(); } @Test(priority = 1) diff --git a/src/test/scripts/subcollections/CreateSubcollectionsTest.java b/src/test/scripts/subcollections/CreateSubcollectionsTest.java index cc3e639..2417f47 100644 --- a/src/test/scripts/subcollections/CreateSubcollectionsTest.java +++ b/src/test/scripts/subcollections/CreateSubcollectionsTest.java @@ -5,6 +5,7 @@ import org.testng.Assert; import org.testng.annotations.AfterClass; +import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; import spot.pages.CollectionEntryPage; @@ -36,6 +37,12 @@ public class CreateSubcollectionsTest extends BaseSelenium { private List subcollectionHierachyNames = new ArrayList<>(); + @BeforeClass + public void resetDriver() { + // Restart the browser to prevent Firefox from crashing (see Ticket #40 'Firefox memory leak') + restartDriver(); + } + /** * IMJ-21, IMJ-226 */