You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2020/02/26 12:55:29 UTC
[Bug 64179] New: [PATCH] Fix TestCellFormat.testApplyObjectDate()
fail in different time zone
https://bz.apache.org/bugzilla/show_bug.cgi?id=64179
Bug ID: 64179
Summary: [PATCH] Fix TestCellFormat.testApplyObjectDate() fail
in different time zone
Product: POI
Version: 4.1.2-FINAL
Hardware: PC
Status: NEW
Severity: normal
Priority: P2
Component: SS Common
Assignee: dev@poi.apache.org
Reporter: hyeonmin.park@kennysoft.kr
Target Milestone: ---
Created attachment 37045
--> https://bz.apache.org/bugzilla/attachment.cgi?id=37045&action=edit
It's a zip archive which includes diff result(diff.txt), the screenshot of the
failed test(fail.png), the screenshot of the resolved test(fix.png).
Due to the time zone, the test `TextCellFormat.testApplyObjectDate()` fails in
my machine. I'm in Asia/Seoul(UTC+9) zone.
> > Task :main:test
>
> expected:<1/1[1]/2012> but was:<1/1[0]/2012>
> Expected :1/11/2012
> Actual :1/10/2012
>
> org.junit.ComparisonFailure: expected:<1/1[1]/2012> but was:<1/1[0]/2012>
> at org.junit.Assert.assertEquals(Assert.java:117)
> at org.junit.Assert.assertEquals(Assert.java:146)
> at org.apache.poi.ss.format.TestCellFormat.testApplyObjectDate(TestCellFormat.java:856)
> ...
As `TestCellFormat.setTimeZone()` sets the user time zone to CET before tests,
I changed to SimpleDateFormat instance have set time zone CET also.
The attached file is a zip archive which includes diff result(diff.txt), the
screenshot of the failed test(fail.png), the screenshot of the resolved
test(fix.png).
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 64179] [PATCH] Fix TestCellFormat.testApplyObjectDate() fail in
different time zone
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64179
Dominik Stadler <do...@gmx.at> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #6 from Dominik Stadler <do...@gmx.at> ---
Applied via r1874949, thanks for the Patch.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 64179] [PATCH] Fix TestCellFormat.testApplyObjectDate() fail in
different time zone
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64179
Hyeonmin Park <hy...@kennysoft.kr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #37046|0 |1
is obsolete| |
--- Comment #5 from Hyeonmin Park <hy...@kennysoft.kr> ---
Created attachment 37048
--> https://bz.apache.org/bugzilla/attachment.cgi?id=37048&action=edit
Updated original patch to match convention of instance name
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 64179] [PATCH] Fix TestCellFormat.testApplyObjectDate() fail in
different time zone
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64179
--- Comment #1 from PJ Fanning <fa...@yahoo.com> ---
Comment on attachment 37045
--> https://bz.apache.org/bugzilla/attachment.cgi?id=37045
It's a zip archive which includes diff result(diff.txt), the screenshot of the
failed test(fail.png), the screenshot of the resolved test(fix.png).
This 'fix' looks wrong to me.
The test passes reliably for me and and in your CI build.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 64179] [PATCH] Fix TestCellFormat.testApplyObjectDate() fail in
different time zone
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64179
Hyeonmin Park <hy...@kennysoft.kr> changed:
What |Removed |Added
----------------------------------------------------------------------------
OS| |All
CC| |hyeonmin.park@kennysoft.kr
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 64179] [PATCH] Fix TestCellFormat.testApplyObjectDate() fail in
different time zone
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64179
--- Comment #3 from Hyeonmin Park <hy...@kennysoft.kr> ---
Created attachment 37046
--> https://bz.apache.org/bugzilla/attachment.cgi?id=37046&action=edit
Patch to set time zone of SimpleDateTime instance to pass the testcase in any
time zone
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 64179] [PATCH] Fix TestCellFormat.testApplyObjectDate() fail in
different time zone
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64179
--- Comment #2 from Hyeonmin Park <hy...@kennysoft.kr> ---
(In reply to PJ Fanning from comment #1)
> Comment on attachment 37045 [details]
> It's a zip archive which includes diff result(diff.txt), the screenshot of
> the failed test(fail.png), the screenshot of the resolved test(fix.png).
>
> This 'fix' looks wrong to me.
>
> The test passes reliably for me and and in your CI build.
The test surely fails in a few time zone. Try to change your machine time zone
to Asia/Seoul and test again.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 64179] [PATCH] Fix TestCellFormat.testApplyObjectDate() fail in
different time zone
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64179
Hyeonmin Park <hy...@kennysoft.kr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #37045|0 |1
is obsolete| |
--- Comment #4 from Hyeonmin Park <hy...@kennysoft.kr> ---
Created attachment 37047
--> https://bz.apache.org/bugzilla/attachment.cgi?id=37047&action=edit
The test really fails in a few time zone. I'm in Asia/Seoul(UTC+9).
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org