fix phase3 phase4 development acceptance blockers
This commit is contained in:
+9
@@ -74,6 +74,15 @@ class CarrierScheduleQuerySqlContractTest {
|
||||
.contains("ADD COLUMN attempt_count INT UNSIGNED NOT NULL DEFAULT 0")
|
||||
.contains("ADD COLUMN next_allowed_at DATETIME(3) NULL")
|
||||
.contains("ADD KEY idx_carrier_schedule_query_due (status,next_allowed_at,id)")
|
||||
.contains("DROP CHECK chk_carrier_schedule_query_access")
|
||||
.contains("DROP CHECK chk_carrier_schedule_query_status")
|
||||
.contains("DROP INDEX uk_carrier_schedule_query_scope")
|
||||
.contains("ADD UNIQUE KEY uk_carrier_schedule_query_scope")
|
||||
.contains("(customer_id,ocean_booking_id,container_scope_id)")
|
||||
.contains("'PUBLIC_FORM','PUBLIC_WEB_PROXY','PUBLIC_HTML','HCAPTCHA','OFFICIAL_API'")
|
||||
.contains("status IN ('READY','MANUAL_REQUIRED','STOPPED')")
|
||||
.contains("ARRIVED_DESTINATION_PORT")
|
||||
.contains("EMPTY_RETURNED")
|
||||
.contains("SET @carrier_schedule_now = CONVERT_TZ(UTC_TIMESTAMP(3),'+00:00','+08:00')")
|
||||
.contains("SET @carrier_schedule_next = CASE")
|
||||
.contains("CREATE PROCEDURE ensure_carrier_schedule_retry_check()")
|
||||
|
||||
+14
@@ -1,6 +1,8 @@
|
||||
package com.baiyue.firstleg.repository;
|
||||
|
||||
import com.baiyue.firstleg.mapper.SmartLoadingCandidateMapper;
|
||||
import com.baiyue.firstleg.dto.SmartLoadingDtos.Candidate;
|
||||
import org.apache.ibatis.annotations.AutomapConstructor;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@@ -9,6 +11,18 @@ import java.lang.reflect.Method;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
class SmartLoadingCandidateMapperContractTest {
|
||||
@Test
|
||||
void canonicalCandidateConstructorIsTheUniqueMybatisAutomapTarget() {
|
||||
long annotated = java.util.Arrays.stream(Candidate.class.getDeclaredConstructors())
|
||||
.filter(constructor -> constructor.isAnnotationPresent(AutomapConstructor.class))
|
||||
.count();
|
||||
|
||||
assertThat(annotated).isEqualTo(1);
|
||||
assertThat(java.util.Arrays.stream(Candidate.class.getDeclaredConstructors())
|
||||
.filter(constructor -> constructor.isAnnotationPresent(AutomapConstructor.class))
|
||||
.findFirst().orElseThrow().getParameterCount()).isEqualTo(18);
|
||||
}
|
||||
|
||||
@Test
|
||||
void selectsLatestApprovedBatch() throws Exception {
|
||||
Method list = SmartLoadingCandidateMapper.class.getDeclaredMethod("candidates", long.class);
|
||||
|
||||
Reference in New Issue
Block a user