Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Dev environment guide? Failing tests

  1. #1
    Yuval Oren Guest

    Default Dev environment guide? Failing tests

    Hi there,

    I'm interested in contributing some code to the Kettle project. I
    figured I'd start by checking out trunk and running the tests, but 25
    of them are failing for me. Is there an environment setup guide? Do
    these tests fail for everyone?

    Here are the first two failures I've investigated:

    1. ValueIntegerTest - passes only if your time zone happens to be GMT
    +02:00.
    I fixed it with the following change:

    --- test/org/pentaho/di/compatibility/ValueIntegerTest.java (revision
    9799)
    +++ test/org/pentaho/di/compatibility/ValueIntegerTest.java (working
    copy)
    @@ -20,6 +20,7 @@
    import java.text.SimpleDateFormat;
    import java.util.Date;
    import java.util.Locale;
    +import java.util.TimeZone;

    import junit.framework.TestCase;

    @@ -114,11 +115,11 @@
    vs.setString("3");
    assertEquals(3, vs.getInteger());

    - SimpleDateFormat format = new SimpleDateFormat("yyyy/MM/dd
    HH:mm:ss.SSS", Locale.US);
    + SimpleDateFormat format = new SimpleDateFormat("yyyy/MM/dd
    HH:mm:ss.SSS zzz", Locale.US);
    Date dt = null;
    try
    {
    - dt = format.parse("2006/06/07 01:02:03.004");
    + dt = format.parse("2006/06/07 01:02:03.004 GMT+2:00");
    }
    catch ( ParseException ex )
    {


    2. ValueMetaTest. Fails with this trace:
    junit.framework.ComparisonFailure: expected:<34039423484343123....>
    but was:< 000000000000000034039423484343123,...>
    at junit.framework.Assert.assertEquals(Assert.java:81)
    at junit.framework.Assert.assertEquals(Assert.java:87)
    at
    org.pentaho.di.core.row.ValueMetaTest.testBigNumberToStringToBigNumber
    (ValueMetaTest.java:142)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke
    (NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke
    (DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at junit.framework.TestCase.runTest(TestCase.java:154)
    at junit.framework.TestCase.runBare(TestCase.java:127)
    at junit.framework.TestResult$1.protect(TestResult.java:106)
    at junit.framework.TestResult.runProtected(TestResult.java:124)
    at junit.framework.TestResult.run(TestResult.java:109)
    at junit.framework.TestCase.run(TestCase.java:118)
    at junit.framework.TestSuite.runTest(TestSuite.java:208)
    at junit.framework.TestSuite.run(TestSuite.java:203)
    at
    org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run
    (JUnit3TestReference.java:130)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run
    (TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests
    (RemoteTestRunner.java:460)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests
    (RemoteTestRunner.java:673)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run
    (RemoteTestRunner.java:386)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main
    (RemoteTestRunner.java:196)




    Cheers,
    Yuval


    --~--~---------~--~----~------------~-------~--~----~
    You received this message because you are subscribed to the Google Groups "kettle-developers" group.
    To post to this group, send email to kettle-developers (AT) googlegroups (DOT) com
    To unsubscribe from this group, send email to kettle-developers+unsubscribe (AT) googlegroups (DOT) com
    For more options, visit this group at http://groups.google.com/group/kettle-developers?hl=en
    -~----------~----~----~----~------~----~------~--~---

  2. #2
    Sven.Boden Guest

    Default Re: Dev environment guide? Failing tests

    A miracle occurs... someone running the unit test cases

    I'll check 1)... I'm pretty sure I'm GMT+1.

    About 2) ... it used to work before, so it's a change of behaviour... I left it open for the moment for someone else to check... Probably it will be adapting the test case to the new reality.

    Regards,
    Sven

    >----- Oorspronkelijk bericht -----
    >Van

    : Yuval Oren [mailto:trumpety (AT) gmail (DOT) com]
    >Verzonden

    : dinsdag
    , december
    9, 2008 06:47 AM
    >Aan

    : 'kettle-developers'
    >Onderwerp

    : Dev environment guide? Failing tests
    >
    >
    >Hi there,
    >
    >I'm interested in contributing some code to the Kettle project. I
    >figured I'd start by checking out trunk and running the tests, but 25
    >of them are failing for me. Is there an environment setup guide? Do
    >these tests fail for everyone?
    >
    >Here are the first two failures I've investigated:
    >
    >1. ValueIntegerTest - passes only if your time zone happens to be GMT
    >+02:00.
    >I fixed it with the following change:
    >
    >--- test/org/pentaho/di/compatibility/ValueIntegerTest.java (revision
    >9799)
    >+++ test/org/pentaho/di/compatibility/ValueIntegerTest.java (working
    >copy)
    >@@ -20,6 +20,7 @@
    > import java.text.SimpleDateFormat;
    > import java.util.Date;
    > import java.util.Locale;
    >+import java.util.TimeZone;
    >
    > import junit.framework.TestCase;
    >
    >@@ -114,11 +115,11 @@
    > vs.setString("3");
    > assertEquals(3, vs.getInteger());
    >
    >- SimpleDateFormat format = new SimpleDateFormat("yyyy/MM/dd
    >HH:mm:ss.SSS", Locale.US);
    >+ SimpleDateFormat format = new SimpleDateFormat("yyyy/MM/dd
    >HH:mm:ss.SSS zzz", Locale.US);
    > Date dt = null;
    > try
    > {
    >- dt = format.parse("2006/06/07 01:02:03.004");
    >+ dt = format.parse("2006/06/07 01:02:03.004 GMT+2:00");
    > }
    > catch ( ParseException ex )
    > {
    >
    >
    >2. ValueMetaTest. Fails with this trace:
    >junit.framework.ComparisonFailure: expected:<34039423484343123....>
    >but was:< 000000000000000034039423484343123,...>
    > at junit.framework.Assert.assertEquals(Assert.java:81)
    > at junit.framework.Assert.assertEquals(Assert.java:87)
    > at
    >org.pentaho.di.core.row.ValueMetaTest.testBigNumberToStringToBigNumber
    >(ValueMetaTest.java:142)
    > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    > at sun.reflect.NativeMethodAccessorImpl.invoke
    >(NativeMethodAccessorImpl.java:39)
    > at sun.reflect.DelegatingMethodAccessorImpl.invoke
    >(DelegatingMethodAccessorImpl.java:25)
    > at java.lang.reflect.Method.invoke(Method.java:585)
    > at junit.framework.TestCase.runTest(TestCase.java:154)
    > at junit.framework.TestCase.runBare(TestCase.java:127)
    > at junit.framework.TestResult$1.protect(TestResult.java:106)
    > at junit.framework.TestResult.runProtected(TestResult.java:124)
    > at junit.framework.TestResult.run(TestResult.java:109)
    > at junit.framework.TestCase.run(TestCase.java:118)
    > at junit.framework.TestSuite.runTest(TestSuite.java:208)
    > at junit.framework.TestSuite.run(TestSuite.java:203)
    > at
    >org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run
    >(JUnit3TestReference.java:130)
    > at org.eclipse.jdt.internal.junit.runner.TestExecution.run
    >(TestExecution.java:38)
    > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests
    >(RemoteTestRunner.java:460)
    > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests
    >(RemoteTestRunner.java:673)
    > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run
    >(RemoteTestRunner.java:386)
    > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main
    >(RemoteTestRunner.java:196)
    >
    >
    >
    >
    >Cheers,
    >Yuval
    >
    >
    >>

    >
    >




    --~--~---------~--~----~------------~-------~--~----~
    You received this message because you are subscribed to the Google Groups "kettle-developers" group.
    To post to this group, send email to kettle-developers (AT) googlegroups (DOT) com
    To unsubscribe from this group, send email to kettle-developers+unsubscribe (AT) googlegroups (DOT) com
    For more options, visit this group at http://groups.google.com/group/kettle-developers?hl=en
    -~----------~----~----~----~------~----~------~--~---

  3. #3
    Matt Casters Guest

    Default Re: Dev environment guide? Failing tests

    The tests fail because formatting support of BigNumber data types got added.
    This is causing tests to fail all over the place.

    For example,
    The String of the BigNumber(42,9) value "34039423484343123.443489056" is no longer the same.
    It is now:

    " 000000000000000034039423484343123,443489056"

    So it looks like that's the right and expected format. However, it does break compatibility so we need to figure out how to make this improvement available with backward compatibility.
    Perhaps we can put default attributes (masks, decimal symbol, etc) on new BigNumber metadata to make it behave the same.

    All the best,

    Matt



    On Tuesday 09 December 2008 12:19:25 Sven.Boden wrote:
    >
    > A miracle occurs... someone running the unit test cases
    >
    > I'll check 1)... I'm pretty sure I'm GMT+1.
    >
    > About 2) ... it used to work before, so it's a change of behaviour... I left it open for the moment for someone else to check... Probably it will be adapting the test case to the new reality.
    >
    > Regards,
    > Sven
    >
    > >----- Oorspronkelijk bericht -----
    > >Van

    > : Yuval Oren [mailto:trumpety (AT) gmail (DOT) com]
    > >Verzonden

    > : dinsdag
    > , december
    > 9, 2008 06:47 AM
    > >Aan

    > : 'kettle-developers'
    > >Onderwerp

    > : Dev environment guide? Failing tests
    > >
    > >
    > >Hi there,
    > >
    > >I'm interested in contributing some code to the Kettle project. I
    > >figured I'd start by checking out trunk and running the tests, but 25
    > >of them are failing for me. Is there an environment setup guide? Do
    > >these tests fail for everyone?
    > >
    > >Here are the first two failures I've investigated:
    > >
    > >1. ValueIntegerTest - passes only if your time zone happens to be GMT
    > >+02:00.
    > >I fixed it with the following change:
    > >
    > >--- test/org/pentaho/di/compatibility/ValueIntegerTest.java (revision
    > >9799)
    > >+++ test/org/pentaho/di/compatibility/ValueIntegerTest.java (working
    > >copy)
    > >@@ -20,6 +20,7 @@
    > > import java.text.SimpleDateFormat;
    > > import java.util.Date;
    > > import java.util.Locale;
    > >+import java.util.TimeZone;
    > >
    > > import junit.framework.TestCase;
    > >
    > >@@ -114,11 +115,11 @@
    > > vs.setString("3");
    > > assertEquals(3, vs.getInteger());
    > >
    > >- SimpleDateFormat format = new SimpleDateFormat("yyyy/MM/dd
    > >HH:mm:ss.SSS", Locale.US);
    > >+ SimpleDateFormat format = new SimpleDateFormat("yyyy/MM/dd
    > >HH:mm:ss.SSS zzz", Locale.US);
    > > Date dt = null;
    > > try
    > > {
    > >- dt = format.parse("2006/06/07 01:02:03.004");
    > >+ dt = format.parse("2006/06/07 01:02:03.004 GMT+2:00");
    > > }
    > > catch ( ParseException ex )
    > > {
    > >
    > >
    > >2. ValueMetaTest. Fails with this trace:
    > >junit.framework.ComparisonFailure: expected:<34039423484343123....>
    > >but was:< 000000000000000034039423484343123,...>
    > > at junit.framework.Assert.assertEquals(Assert.java:81)
    > > at junit.framework.Assert.assertEquals(Assert.java:87)
    > > at
    > >org.pentaho.di.core.row.ValueMetaTest.testBigNumberToStringToBigNumber
    > >(ValueMetaTest.java:142)
    > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    > > at sun.reflect.NativeMethodAccessorImpl.invoke
    > >(NativeMethodAccessorImpl.java:39)
    > > at sun.reflect.DelegatingMethodAccessorImpl.invoke
    > >(DelegatingMethodAccessorImpl.java:25)
    > > at java.lang.reflect.Method.invoke(Method.java:585)
    > > at junit.framework.TestCase.runTest(TestCase.java:154)
    > > at junit.framework.TestCase.runBare(TestCase.java:127)
    > > at junit.framework.TestResult$1.protect(TestResult.java:106)
    > > at junit.framework.TestResult.runProtected(TestResult.java:124)
    > > at junit.framework.TestResult.run(TestResult.java:109)
    > > at junit.framework.TestCase.run(TestCase.java:118)
    > > at junit.framework.TestSuite.runTest(TestSuite.java:208)
    > > at junit.framework.TestSuite.run(TestSuite.java:203)
    > > at
    > >org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run
    > >(JUnit3TestReference.java:130)
    > > at org.eclipse.jdt.internal.junit.runner.TestExecution.run
    > >(TestExecution.java:38)
    > > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests
    > >(RemoteTestRunner.java:460)
    > > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests
    > >(RemoteTestRunner.java:673)
    > > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run
    > >(RemoteTestRunner.java:386)
    > > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main
    > >(RemoteTestRunner.java:196)
    > >
    > >
    > >
    > >
    > >Cheers,
    > >Yuval
    > >
    > >
    > >>

    > >
    > >

    >
    >
    >
    > >

    >
    >



    --
    Matt
    ____________________________________________
    Matt Casters
    Chief Data Integration - Kettle founder
    Pentaho, Open Source Business Intelligence
    http://www.pentaho.org -- mcasters (AT) pentaho (DOT) org
    Tel. +32 (0) 486 97 29 37

    --~--~---------~--~----~------------~-------~--~----~
    You received this message because you are subscribed to the Google Groups "kettle-developers" group.
    To post to this group, send email to kettle-developers (AT) googlegroups (DOT) com
    To unsubscribe from this group, send email to kettle-developers+unsubscribe (AT) googlegroups (DOT) com
    For more options, visit this group at http://groups.google.com/group/kettle-developers?hl=en
    -~----------~----~----~----~------~----~------~--~---

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.