File tree Expand file tree Collapse file tree
src/test/java/org/zalando/sprocwrapper Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # This workflow will build a Java project with Maven
2+ # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
3+
4+ name : Build master branch
5+
6+ on :
7+ push :
8+ branches : [ master ]
9+ pull_request :
10+ branches : [ master ]
11+
12+ jobs :
13+ build :
14+ runs-on : ubuntu-latest
15+
16+ services :
17+ postgres :
18+ image : postgres:13
19+ env :
20+ POSTGRES_PASSWORD : postgres
21+ # Set health checks to wait until postgres has started
22+ options : >-
23+ --health-cmd pg_isready
24+ --health-interval 10s
25+ --health-timeout 5s
26+ --health-retries 5
27+ ports :
28+ - 5432:5432
29+
30+ steps :
31+ - uses : actions/checkout@v2
32+ - name : Set up JDK 11
33+ uses : actions/setup-java@v1
34+ with :
35+ java-version : 11
36+ - name : Cache local Maven repository
37+ uses : actions/cache@v2
38+ with :
39+ path : ~/.m2/repository
40+ key : ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
41+ restore-keys : |
42+ ${{ runner.os }}-maven-
43+ - name : Build with Maven
44+ run : ./mvnw -B clean verify
Original file line number Diff line number Diff line change 77import java .sql .Statement ;
88import java .sql .Timestamp ;
99import java .text .SimpleDateFormat ;
10+ import java .time .LocalDateTime ;
11+ import java .time .ZoneId ;
1012import java .util .ArrayList ;
1113import java .util .Arrays ;
1214import java .util .Collections ;
@@ -414,7 +416,8 @@ public void testChar() {
414416 @ Test
415417 public void testReturnDate () {
416418 final Date d = exampleSProcService .getFixedTestDate ();
417- assertEquals (1328266821000L , d .getTime ()); // extract(epoch from '2012-02-03 12:00:21'::timestamp)*1000
419+ final LocalDateTime targetDateTime = LocalDateTime .parse ("2012-02-03T12:00:21" );
420+ assertEquals (targetDateTime , LocalDateTime .ofInstant (d .toInstant (), ZoneId .systemDefault ()));
418421 }
419422
420423 @ Test
You can’t perform that action at this time.
0 commit comments