Skip to content

Commit

Permalink
Add timestamp after play init in firephoque
Browse files Browse the repository at this point in the history
  • Loading branch information
hkroger committed Mar 27, 2017
1 parent 8fa88c2 commit 5104078
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion modules/testrunner/src/play/modules/testrunner/FirePhoque.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,14 @@
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.URL;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.TimeZone;

import net.sourceforge.htmlunit.corejs.javascript.Context;
import net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime;
Expand Down Expand Up @@ -177,7 +181,13 @@ public String handlePrompt(Page page, String message) {
maxLength = testName.length();
}
}
System.out.println("~ " + tests.size() + " test" + (tests.size() != 1 ? "s" : "") + " to run:");

TimeZone tz = TimeZone.getTimeZone("UTC");
DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
df.setTimeZone(tz);
String timestamp = df.format(new Date());

System.out.println("~ " + timestamp + ": " + tests.size() + " test" + (tests.size() != 1 ? "s" : "") + " to run:");
System.out.println("~");
firephoque.openWindow(new URL(app + "/@tests/init"), "headless");
boolean ok = true;
Expand Down

0 comments on commit 5104078

Please sign in to comment.