curcuru     01/03/13 11:16:08

  Modified:    test/java/src/org/apache/qetest QetestUtils.java
  Log:
  Update createRunId to match C version: MMMdd-mmss
  
  Revision  Changes    Path
  1.3       +9 -6      
xml-xalan/test/java/src/org/apache/qetest/QetestUtils.java
  
  Index: QetestUtils.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/test/java/src/org/apache/qetest/QetestUtils.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- QetestUtils.java  2001/03/13 00:35:59     1.2
  +++ QetestUtils.java  2001/03/13 19:16:03     1.3
  @@ -64,7 +64,7 @@
    * Static utility class for both general-purpose testing methods 
    * and a few XML-specific methods.
    * @author [EMAIL PROTECTED]
  - * @version $Id: QetestUtils.java,v 1.2 2001/03/13 00:35:59 curcuru Exp $
  + * @version $Id: QetestUtils.java,v 1.3 2001/03/13 19:16:03 curcuru Exp $
    */
   public class QetestUtils
   {
  @@ -199,17 +199,20 @@
        * analysis stylesheets to create comparative charts showing 
        * differences in results and timing data from one run of 
        * a test to another.
  +     *
  +     * Current format: MMMdd-hhmm[;baseId]
  +     * where baseId is not used if null.
        * 
        * @param String Id base to start with
        * @return String Id to use; normally will include a timestamp
        */
       public static String createRunId(String baseId)
       {
  -        //@todo  Hmmm - what do we want in the runId?
  -        // For now, just use milliseconds timer and some strings
  -        String timeId = Long.toString(System.currentTimeMillis());
  -        return "runId;" + baseId + ";" + timeId;
  -
  +        java.text.SimpleDateFormat formatter = new 
java.text.SimpleDateFormat ("MMMdd-hhmm");
  +        if (null != baseId)
  +            return formatter.format(new java.util.Date())+ ";" + baseId;
  +        else
  +            return formatter.format(new java.util.Date());
       }
   
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to