Skip to content

Commit

Permalink
Issue #2343 - Fixed failign tests.
Browse files Browse the repository at this point in the history
Signed-off-by: Tomáš Kraus <tomas.kraus@oracle.com>
  • Loading branch information
Tomas-Kraus committed Jan 22, 2025
1 parent 39dbe16 commit 3aee10d
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import java.time.Instant;
import java.time.LocalDateTime;

import org.eclipse.persistence.logging.SessionLog;
import org.eclipse.persistence.testing.models.jpa.persistence32.InstantVersionEntity;
import org.eclipse.persistence.testing.models.jpa.persistence32.LdtVersionEntity;
import org.eclipse.persistence.testing.models.jpa.persistence32.TimestampVersionEntity;
Expand Down Expand Up @@ -84,6 +85,15 @@ protected void suiteSetUp() {
em.persist(TS_ENTITIES[i]);
}
});
// MySQL platform has version precision set to 1 sec. Make sure it gets incremented
// before running the tests.
if (emf.getDatabaseSession().getPlatform().isMySQL()) {
try {
Thread.sleep(1000);
} catch (InterruptedException ex) {
emf.getDatabaseSession().logThrowable(SessionLog.FINEST, SessionLog.JPA, ex);
}
}
}

}

0 comments on commit 3aee10d

Please sign in to comment.