Permalink
Browse files

FACES-2998 Upgrade Bridge TCK tests to the new test framework (code r…

…eview)
  • Loading branch information...
1 parent 1a8f47e commit 526dd72f0b9cf34ca858361c7e705e80635a07f5 @ngriffin7a ngriffin7a committed Feb 9, 2017
@@ -18,6 +18,10 @@
<artifactId>com.liferay.faces.bridge.api</artifactId>
</dependency>
<dependency>
+ <groupId>com.liferay.faces</groupId>
+ <artifactId>com.liferay.faces.util</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-api</artifactId>
<scope>compile</scope>
@@ -23,9 +23,11 @@
import java.util.List;
import java.util.Properties;
import java.util.logging.Level;
-import java.util.logging.Logger;
import java.util.regex.Pattern;
+import com.liferay.faces.util.logging.Logger;
+import com.liferay.faces.util.logging.LoggerFactory;
+
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
@@ -52,7 +54,7 @@
public class TckTestCase extends IntegrationTesterBase {
// Logger
- private static final Logger logger = Logger.getLogger(TckTestCase.class.getName());
+ private static final Logger logger = LoggerFactory.getLogger(TckTestCase.class);
// XPath
private static final String TEST_RESULT_STATUS_XPATH_TEMPLATE = "//span[@id=\"{0}-result-status\"]";
@@ -83,8 +85,6 @@
static {
- logger.setLevel(TestUtil.getLogLevel());
-
String tckContext = "/";
int defaultBrowserWaitTimeout = 5;
@@ -117,7 +117,7 @@ public static void main(String[] args) {
@Parameters
public static Collection testData() {
- logger.log(Level.INFO, "testData()");
+ logger.info("testData()");
List testList = new ArrayList<String[]>(200);
InputStream excludedTestsInputStream = null;
@@ -127,7 +127,7 @@ public static Collection testData() {
excludedTestsInputStream = TckTestCase.class.getResourceAsStream(EXCLUDED_TESTS_FILE_PATH);
}
catch (Exception e) {
- logger.log(Level.SEVERE, "Unable to acccess test exclusions file, {0} Exception thrown: {1}",
+ logger.error("Unable to acccess test exclusions file, {0} Exception thrown: {1}",
new String[] { EXCLUDED_TESTS_FILE_PATH, e.getMessage() });
System.exit(1);
}
@@ -138,7 +138,7 @@ public static Collection testData() {
exProps.loadFromXML(excludedTestsInputStream);
}
catch (Exception e) {
- logger.log(Level.SEVERE, "Unable to parse test exclusions file, {0} Exception thrown: {1}",
+ logger.error("Unable to parse test exclusions file, {0} Exception thrown: {1}",
new String[] { EXCLUDED_TESTS_FILE_PATH, e.getMessage() });
System.exit(1);
}
@@ -147,7 +147,7 @@ public static Collection testData() {
testsInputStream = TckTestCase.class.getResourceAsStream(TESTS_FILE_PATH);
}
catch (Exception e) {
- logger.log(Level.SEVERE, "Unable to acccess test description file, {0} Exception thrown: {1}",
+ logger.error("Unable to acccess test description file, {0} Exception thrown: {1}",
new String[] { TESTS_FILE_PATH, e.getMessage() });
System.exit(1);
}
@@ -158,7 +158,7 @@ public static Collection testData() {
testProps.loadFromXML(testsInputStream);
}
catch (Exception e) {
- logger.log(Level.SEVERE, "Unable to parse test description file, {0} Exception thrown: {1}",
+ logger.error("Unable to parse test description file, {0} Exception thrown: {1}",
new String[] { TESTS_FILE_PATH, e.getMessage() });
System.exit(1);
}

0 comments on commit 526dd72

Please sign in to comment.