Hi Keith,
 
You can go ahead with fixing of this issue.
 
I investigated this issue and I think I have found the cause of problem.
I m listing the issues, which I think are creating the problem - 
 
1)  In ConfigurationInitializer class we have a method
createSystemConfiguration(), this method returns SystemConfiguration
object.
For creating SystemConfiguration we have hardcoded the value for
timeZone, I think we need to remove this hardcoding and instead of
that we need to get default time zone or user's timezone.
 
2) Moreover if you check TestSavingsHelper class, we have a testcase
testGetNextInterestCalculationDateEveryMonth() (which is getting
failed because of this problem); there we are calling two methods,
namely getNextScheduleDate() & getDate(); getDate() is fine, but in
getNextScheduleDate() method we are getting date from MeetingBO object,
by calling getNextScheduleDateAfterRecurrence(). I think problem is
there in MeetingBO. In MeetingBO we are creating instance of
GregorianCalendar without specifying the timeZone. And in java if you
don't specify timeZone, your date will be interpreted using the the
local default TimeZone. If the user has not configured it correctly in
his OS, you may get Pacific Standard time or GMT, without warning.
Therefore, I think here we need to create instance of GregorianCalendar
by specifying user's timezone.
 
3) Also, in MeetingBO we are using one method from DateUtils class,
namely getCalendarDate; in this method again we are creating instance of
GregorianCalendar without specifying timeZone.
 
I feel the above mentioned issues are root cause of problem. Do let me
know if I m wrong or if I can be of any help.
Thanks & Regards,
Saurabh Kumar * Developer * SunGard * Offshore Services * Divyasree
Chambers, Langford Road, Bangalore 560025 India 
Tel +91-80-2222-0501 * Mobile +91-9886945575 * Fax +91-80-2222-0511 *
<http://www.sungard.com/> www.sungard.com
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Keith Pierce
Sent: Wednesday, November 14, 2007 9:58 PM
To: Developer
Subject: Re: [Mifos-developer] Patch for moratorium module....
 
Saurabh, I just assigned issue 1491 (timezone problems with unit tests)
to myself. I've already found some easily-fixed bugs. Let me know how
you'd like to proceed: take over the issue, collaborate on it, or leave
it to me so you can work on higher-priority issues. I am pretty new to
MifOS, and this looked like a good place for me to start diving in. 

Keith Pierce
On Nov 14, 2007 3:27 AM, Saurabh Kumar <[EMAIL PROTECTED]>
wrote:
 
Hi Tom,
 
I tried by changing the timezone to Pacific and the testsuite passed
successfully.
 
Please find the patch for moratorium module attached with the mail.
 
As far as the issue regarding failing of testsuite because of different
timezones is concerned, I am looking into that. Will update you as soon
as I crack the problem.
 
Thanks & Regards, 
Saurabh Kumar  * Developer * SunGard * Offshore Services * Divyasree
Chambers, Langford Road, Bangalore 560025 India 
Tel +91-80-2222-0501 * Mobile +91-9886945575 * Fax +91-80-2222-0511 *
<http://www.sungard.com/> www.sungard.com 
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Tom
Bostelmann
Sent: Tuesday, November 13, 2007 4:53 PM
To: Developer
Subject: Re: [Mifos-developer] Patch for moratorium module....
 
Another good option would be to fix the bug and submit a fix with the
code :)

You can add this to your patch of you would like or you can submit the
fix as a separate patch.

Aliya, is there an issue number associated with this? 
On Nov 13, 2007 8:50 AM, Aliya Walji <[EMAIL PROTECTED]>
wrote:
Hi Saurabh,
 
Currently, if I'm not mistaken, we have a bug where the test suite fails
when the time zone is not set to Pacific timezone.  This may be what is
causing the issue for you.  Can you try changing your system timezone to
Pacific Time and running the test suite again?  Hopefully this will
resolve your issue.
 
Thanks,
 
Aliya
 
  _____  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Saurabh Kumar
Sent: Monday, November 12, 2007 11:00 PM

To: Developer
Subject: Re: [Mifos-developer] Patch for moratorium module....
 
 
Hi Aliya,
 
I have checked the code and I feel there might me some configuration
issue with date.
 
There is some problem with setting of FiscalWeekStartDay --
 
<testcase
classname="org.mifos.framework.components.configuration.business.TestCon
figuration" name="testAreaOfficeConfiguration" time="0.0">
    <failure message ="expected:&lt;2&gt; but was:&lt;0&gt;"
type="junit.framework.AssertionFailedError">junit.framework.AssertionFai
ledError: expected:&lt;2&gt; but was:&lt;0&gt;
          at
org.mifos.framework.components.configuration.business.TestConfiguration.
assertForMeetingConfig(TestConfiguration.java:86)
          at
org.mifos.framework.components.configuration.business.TestConfiguration.
testAreaOfficeConfiguration(TestConfiguration.java:52)
</failure>
  </testcase>
 
In above failure of assertion it is trying to get FiscalWeekStartDay,
whose value is 0 instead of two.
 
<testcase
classname="org.mifos.application.accounts.savings.business.TestSavingsBO
" name="testCalculateInterest_IntCalcFreqTenDays_minbal" time="0.888">
    <failure message ="expected:&lt; Sat Apr 01 00: 00:00 IST 2006&gt;
but was:&lt; Mon Apr 03 00: 00:00 IST 2006&gt;"
type="junit.framework.AssertionFailedError">junit.framework.AssertionFai
ledError: expected:&lt;Sat Apr 01 00 :00:00 IST 2006&gt; but was:&lt;Mon
Apr 03 00 :00:00 IST 2006&gt;
          at
org.mifos.application.accounts.savings.business.TestSavingsBO.testCalcul
ateInterest_IntCalcFreqTenDays_minbal(TestSavingsBO.java:2390)
</failure>
  </testcase>
 
Any idea, what might be the problem??
 
For reference I m attaching the test suite report with mail.
 
Thanks & Regards, 
Saurabh Kumar  * Developer * SunGard * Offshore Services * Divyasree
Chambers, Langford Road, Bangalore 560025 India 
Tel +91-80-2222-0501 * Mobile +91-9886945575 * Fax +91-80-2222-0511 *
<http://www.sungard.com/> www.sungard.com 
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Aliya Walji
Sent: Tuesday, November 13, 2007 12:17 AM
To: Developer
Subject: Re: [Mifos-developer] Patch for moratorium module....
 
Hi Saurabh,
 
When I look at the build server, revision 2183 does not seem to have any
build issues or test failures.  You may want to investigate things on
your side again if you are still experiencing test failures in the
latest code.
 
Aliya
 
  _____  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Saurabh Kumar
Sent: Monday, November 12, 2007 2:48 AM
To: Developer
Subject: Re: [Mifos-developer] Patch for moratorium module....
 
 
Hi Tom,
 
Thanks for reviewing the patch.
 
I m sending new patch, it contains code which is integrated with
revision 12183.
 
Do let me know if there are still any issues.
 
Please note that the test suite in revision 12183 is getting failed
(without our code.) After integrating our code, I have checked
thoroughly and there are no issues because of our code.
Thanks & Regards,
Saurabh Kumar  * Developer * SunGard * Offshore Services * Divyasree
Chambers, Langford Road, Bangalore 560025 India 
Tel +91-80-2222-0501 * Mobile +91-9886945575 * Fax +91-80-2222-0511 *
<http://www.sungard.com/> www.sungard.com 
 

------------------------------------------------------------------------
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser. 
Download your FREE copy of Splunk now >> http://get.splunk.com/
 

------------------------------------------------------------------------
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser. 
Download your FREE copy of Splunk now >> http://get.splunk.com/
 
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/

Reply via email to