Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix timezone issue on testing. #1770

Closed
wants to merge 7 commits into from
Closed

fix timezone issue on testing. #1770

wants to merge 7 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Jan 27, 2016

some tests with datetime are failed at South Korea.
so add some code with timezone and it's resolved.

@@ -8,7 +8,9 @@
<property name="fileExtensions" value="java, properties, xml"/>

<!-- maximum file length 2000 lines -->
<module name="FileLength"/>
<module name="FileLength">
<property name="max" value="2500"/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only overridden on a per-file basis.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rollbacked that.
I misunderstood it.

@timowest
Copy link
Member

@songsungkyun Which tests failed?

@ghost
Copy link
Author

ghost commented Jan 28, 2016

This is a part of failed.

asDate_returns_a_corresponding_DateExpression_for_a_given_Constant(com.querydsl.core.types.dsl.ExpressionsTest)  Time elapsed: 0.008 sec  <<< FAILURE!
org.junit.ComparisonFailure: expected:<year(Thu Jan 01 0[0:00:00 UTC] 1970)> but was:<year(Thu Jan 01 0[9:00:00 PWT] 1970)>
    at org.junit.Assert.assertEquals(Assert.java:115)
    at org.junit.Assert.assertEquals(Assert.java:144)
    at com.querydsl.core.types.dsl.ExpressionsTest.asDate_returns_a_corresponding_DateExpression_for_a_given_Constant(ExpressionsTest.java:312)

asTime_returns_a_corresponding_TimeExpression_for_a_given_Expression(com.querydsl.core.types.dsl.ExpressionsTest)  Time elapsed: 0 sec  <<< FAILURE!
org.junit.ComparisonFailure: expected:<hour(Thu Jan 01 0[0:00:00 UTC] 1970)> but was:<hour(Thu Jan 01 0[9:00:00 PWT] 1970)>
    at org.junit.Assert.assertEquals(Assert.java:115)
    at org.junit.Assert.assertEquals(Assert.java:144)
    at com.querydsl.core.types.dsl.ExpressionsTest.asTime_returns_a_corresponding_TimeExpression_for_a_given_Expression(ExpressionsTest.java:328)

asDateTime_returns_a_corresponding_DateTimeExpression_for_a_given_Constant(com.querydsl.core.types.dsl.ExpressionsTest)  Time elapsed: 0.001 sec  <<< FAILURE!
org.junit.ComparisonFailure: expected:<min(Thu Jan 01 0[0:00:00 UTC] 1970)> but was:<min(Thu Jan 01 0[9:00:00 PWT] 1970)>
    at org.junit.Assert.assertEquals(Assert.java:115)
    at org.junit.Assert.assertEquals(Assert.java:144)
    at com.querydsl.core.types.dsl.ExpressionsTest.asDateTime_returns_a_corresponding_DateTimeExpression_for_a_given_Constant(ExpressionsTest.java:323)

asDateTime_returns_a_corresponding_DateTimeExpression_for_a_given_Expression(com.querydsl.core.types.dsl.ExpressionsTest)  Time elapsed: 0 sec  <<< FAILURE!
org.junit.ComparisonFailure: expected:<min(Thu Jan 01 0[0:00:00 UTC] 1970)> but was:<min(Thu Jan 01 0[9:00:00 PWT] 1970)>
    at org.junit.Assert.assertEquals(Assert.java:115)
    at org.junit.Assert.assertEquals(Assert.java:144)
    at com.querydsl.core.types.dsl.ExpressionsTest.asDateTime_returns_a_corresponding_DateTimeExpression_for_a_given_Expression(ExpressionsTest.java:317)

asTime_returns_a_corresponding_TimeExpression_for_a_given_Constant(com.querydsl.core.types.dsl.ExpressionsTest)  Time elapsed: 0 sec  <<< FAILURE!
org.junit.ComparisonFailure: expected:<hour(Thu Jan 01 0[0:00:00 UTC] 1970)> but was:<hour(Thu Jan 01 0[9:00:00 PWT] 1970)>
    at org.junit.Assert.assertEquals(Assert.java:115)
    at org.junit.Assert.assertEquals(Assert.java:144)
    at com.querydsl.core.types.dsl.ExpressionsTest.asTime_returns_a_corresponding_TimeExpression_for_a_given_Constant(ExpressionsTest.java:334)

asDate_returns_a_corresponding_DateExpression_for_a_given_Expression(com.querydsl.core.types.dsl.ExpressionsTest)  Time elapsed: 0.001 sec  <<< FAILURE!
org.junit.ComparisonFailure: expected:<year(Thu Jan 01 0[0:00:00 UTC] 1970)> but was:<year(Thu Jan 01 0[9:00:00 PWT] 1970)>
    at org.junit.Assert.assertEquals(Assert.java:115)
    at org.junit.Assert.assertEquals(Assert.java:144)
    at com.querydsl.core.types.dsl.ExpressionsTest.asDate_returns_a_corresponding_DateExpression_for_a_given_Expression(ExpressionsTest.java:306)

@johnktims
Copy link
Member

Other than maybe squashing some of the commits, I think this change is fine.

@@ -13,6 +14,9 @@

@Before
public void setUp() {
System.setProperty("user.timezone", "UTC");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what failures do you have with this test?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@timowest
weird.
I remembered it was failed with testing on querydls-sql module.
but it's gone now.

@timowest
Copy link
Member

Could you squash the commits? Then it would be fine to merge.

@ghost ghost mentioned this pull request Jan 31, 2016
@ghost
Copy link
Author

ghost commented Jan 31, 2016

moved to #1775

@ghost ghost closed this Jan 31, 2016
@timowest
Copy link
Member

you can also force push the result of the rebase.

@Shredder121
Copy link
Member

Yes, as long as you move the tip of the branch the pull request points to (songsungkyun:timezone, so your timezone branch) the pull request reflects that change.

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants