Skip to content

Commit

Permalink
SHIBUI-2264
Browse files Browse the repository at this point in the history
Backend tests updated to truncate time accuracy.
Updated JDBC libs
  • Loading branch information
chasegawa committed May 10, 2022
1 parent b83f96e commit e917dd0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
9 changes: 3 additions & 6 deletions backend/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ dependencies {

compile "com.h2database:h2"
runtimeOnly 'org.postgresql:postgresql:42.3.4'
runtimeOnly 'org.mariadb.jdbc:mariadb-java-client:2.2.0'
runtimeOnly 'mysql:mysql-connector-java:8.0.28'
runtimeOnly 'org.mariadb.jdbc:mariadb-java-client:3.0.4'
runtimeOnly 'mysql:mysql-connector-java:8.0.29'

//Swagger
compile 'io.springfox:springfox-swagger2:2.9.2'
Expand All @@ -180,10 +180,6 @@ dependencies {
testImplementation platform("org.spockframework:spock-bom:2.1-groovy-3.0")
testImplementation "org.spockframework:spock-core"
testImplementation "org.spockframework:spock-spring"
//testImplementation "org.spockframework:spock-junit4"
//testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2'
//testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.8.2'
//testRuntimeOnly 'org.junit.vintage:junit-vintage-engine:5.8.2'

testCompile 'org.springframework.boot:spring-boot-starter-test:2.6.7'
testCompile 'org.springframework.security:spring-security-test:5.6.3'
Expand Down Expand Up @@ -224,6 +220,7 @@ dependencies {
enversTestCompile sourceSets.test.output
enversTestCompile configurations.compile
enversTestCompile configurations.testCompile
enversTestCompile configurations.testImplementation

enversTestRuntime configurations.runtime
enversTestRuntime configurations.testRuntime
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
Expand All @@ -28,7 +26,6 @@
import java.time.ZonedDateTime;
import java.time.temporal.ChronoUnit;


@MappedSuperclass
@EntityListeners(AuditingEntityListener.class)
@EqualsAndHashCode(exclude = {"current"})
Expand Down Expand Up @@ -80,7 +77,7 @@ public LocalDateTime getCreatedDate() {

@Override
public void setCreatedDate(LocalDateTime createdDate) {
this.createdDate = createdDate;
this.createdDate = createdDate == null ? null : createdDate.truncatedTo(ChronoUnit.NANOS);
}

@Override
Expand All @@ -90,7 +87,7 @@ public LocalDateTime getModifiedDate() {

@Override
public void setModifiedDate(LocalDateTime modifiedDate) {
this.modifiedDate = modifiedDate;
this.modifiedDate = modifiedDate == null ? null : modifiedDate.truncatedTo(ChronoUnit.NANOS);
}

public String getCreatedBy() {
Expand Down

0 comments on commit e917dd0

Please sign in to comment.