-
Notifications
You must be signed in to change notification settings - Fork 209
Closed
Description
With MS Sql Server.
Testcase to add to MSSQLPreparedQueryNotNullableDataTypeTest
@Test
public void testEncodeDateTimeWithMillis(TestContext ctx) {
final LocalDateTime start = LocalDateTime.now().truncatedTo(ChronoUnit.MILLIS);
testPreparedQueryEncodeGeneric(ctx, "not_nullable_datatype", "test_datetime2", start, row -> {
ColumnChecker.checkColumn(0, "test_datetime2")
.returns(Tuple::getValue, Row::getValue, start)
.returns(Tuple::getLocalDateTime, Row::getLocalDateTime, start)
.returns(Tuple::getLocalDate, Row::getLocalDate, start.toLocalDate())
.returns(Tuple::getLocalTime, Row::getLocalTime, start.toLocalTime())
.returns(LocalDateTime.class, start)
.forRow(row);
});
}
Result:
junit.framework.AssertionFailedError: Expected that public abstract java.lang.Object io.vertx.sqlclient.Tuple.getValue(int) would not fail:
Expected :2021-06-09T17:20:40.643
Actual :2021-06-09T17:31:23