public inbox for mauve-patches@sourceware.org
 help / color / mirror / Atom feed
From: Joshua Sumali <jsumali@redhat.com>
To: mauve-patches@sources.redhat.com
Subject: FYI: Test Fix
Date: Tue, 24 Jul 2007 19:37:00 -0000	[thread overview]
Message-ID: <46A65505.1090508@redhat.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 290 bytes --]

Another small patch that fixes a test's expectations, in 
gnu/testlet/java/util/logging/XMLFormatter/formatMessage.java

2007-07-24    Joshua Sumali    <jsumali@redhat.com>

    * gnu/testlet/java/util/logging/XMLFormatter/formatMessage.java:
    (EXPECTED_PREFIX): Fixed expected string.


[-- Attachment #2: diff_formatMessage --]
[-- Type: text/plain, Size: 1447 bytes --]


#P mauve
Index: gnu/testlet/java/util/logging/XMLFormatter/formatMessage.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/java/util/logging/XMLFormatter/formatMessage.java,v
retrieving revision 1.1
diff -u -r1.1 formatMessage.java
--- gnu/testlet/java/util/logging/XMLFormatter/formatMessage.java	26 Feb 2004 19:41:42 -0000	1.1
+++ gnu/testlet/java/util/logging/XMLFormatter/formatMessage.java	24 Jul 2007 19:07:29 -0000
@@ -28,6 +28,7 @@
 import java.util.logging.LogRecord;
 import java.util.logging.XMLFormatter;
 
+import java.util.TimeZone;
 
 /**
  * @author <a href="mailto:brawer@dandelis.ch">Sascha Brawer</a>
@@ -58,6 +59,11 @@
 
     // Check #2.
     rec = new LogRecord(Level.INFO, "foobar");
+    
+    //Need to force the default time zone to UTC or else
+    //the comparison uses system time zone and makes the tests
+    //break.
+    TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
     rec.setMillis(1234567);
     rec.setSequenceNumber(42);
     rec.setThreadID(21);
@@ -124,9 +130,11 @@
   }
 
 
+  //1234567 milliseconds is only 20 minutes and 
+  //34 seconds (past the Epoch, UTC time).
   private static final String EXPECTED_PREFIX =
      "<record>\n"
-    + "  <date>1970-01-01T01:20:34</date>\n"
+    + "  <date>1970-01-01T00:20:34</date>\n"
     + "  <millis>1234567</millis>\n"
     + "  <sequence>42</sequence>\n"
     + "  <level>INFO</level>\n";

             reply	other threads:[~2007-07-24 19:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-24 19:37 Joshua Sumali [this message]
2007-09-12 20:53 ` FYI: Makefile and configure fix Joshua Sumali
  -- strict thread matches above, loose matches on Subject: below --
2007-07-24 13:28 FYI: Test Fix Joshua Sumali
2007-07-24 20:17 ` David Daney
2007-07-18 18:49 Joshua Sumali
2007-07-13 20:22 Joshua Sumali
2007-07-13 16:04 Joshua Sumali
2007-07-10 14:03 Joshua Sumali
2007-06-29 19:38 Tania Bento
2007-06-29 22:42 ` Mario Torre
2007-07-03 13:11   ` Tania Bento

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46A65505.1090508@redhat.com \
    --to=jsumali@redhat.com \
    --cc=mauve-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).