-
Notifications
You must be signed in to change notification settings - Fork 861
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
import static org.junit.Assert.assertEquals; | ||
|
||
import java.sql.Types; | ||
import java.util.TimeZone; | ||
|
||
import org.junit.Before; | ||
import org.junit.Test; | ||
|
@@ -14,6 +15,8 @@ public class ArrayTypesTest { | |
@Before | ||
public void setUp() { | ||
configuration = Configuration.DEFAULT; | ||
System.setProperty("user.timezone", "UTC"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what failures do you have with this test? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @timowest |
||
TimeZone.setDefault(null); | ||
} | ||
|
||
@Test | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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"/> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is only overridden on a per-file basis. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. rollbacked that. |
||
</module> | ||
|
||
<!-- check that there are no tab characters in the file --> | ||
<module name="FileTabCharacter"> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also reset in after block
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@timowest
Yeah. I added setUp and tearDown.
I rewrote small bit of code.