| | |
| | | # 国际化资源文件路径 |
| | | basename: i18n/messages |
| | | profiles: |
| | | active: druid |
| | | # 仓库默认启动用于本机联调;真实设备部署必须覆盖并移除 dev-simulator。 |
| | | active: druid,dev-simulator |
| | | # 文件上传 |
| | | servlet: |
| | | multipart: |
| | |
| | | PRIMARY KEY (snapshot_id), |
| | | UNIQUE KEY uk_test_snapshot_slot (test_id, binding_id, capture_slot_utc), |
| | | KEY idx_snapshot_test_time (test_id, capture_slot_utc), |
| | | CONSTRAINT fk_snapshot_test FOREIGN KEY (test_id) REFERENCES t_test (test_id), |
| | | CONSTRAINT fk_snapshot_binding FOREIGN KEY (binding_id) REFERENCES t_test_channel_binding (binding_id), |
| | | CONSTRAINT fk_snapshot_channel FOREIGN KEY (channel_id) REFERENCES t_detection_channel (channel_id), |
| | | CONSTRAINT fk_snapshot_collector FOREIGN KEY (collector_id) REFERENCES t_collector (collector_id) |
| | | CONSTRAINT fk_realtime_snapshot_test FOREIGN KEY (test_id) REFERENCES t_test (test_id), |
| | | CONSTRAINT fk_realtime_snapshot_binding FOREIGN KEY (binding_id) REFERENCES t_test_channel_binding (binding_id), |
| | | CONSTRAINT fk_realtime_snapshot_channel FOREIGN KEY (channel_id) REFERENCES t_detection_channel (channel_id), |
| | | CONSTRAINT fk_realtime_snapshot_collector FOREIGN KEY (collector_id) REFERENCES t_collector (collector_id) |
| | | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='主动轮询形成的完整实时采集快照'; |
| New file |
| | |
| | | package com.ruoyi.config; |
| | | |
| | | import static org.junit.jupiter.api.Assertions.assertEquals; |
| | | |
| | | import java.util.List; |
| | | import org.junit.jupiter.api.Test; |
| | | import org.springframework.boot.env.YamlPropertySourceLoader; |
| | | import org.springframework.core.io.ClassPathResource; |
| | | |
| | | class DevelopmentSimulatorProfileContractTest |
| | | { |
| | | @Test |
| | | void enablesSimulatorSchedulingForDefaultDevelopmentStartup() throws Exception |
| | | { |
| | | var sources = new YamlPropertySourceLoader().load("application", new ClassPathResource("application.yml")); |
| | | Object profiles = sources.get(0).getProperty("spring.profiles.active"); |
| | | |
| | | assertEquals(List.of("druid", "dev-simulator"), List.of(String.valueOf(profiles).split(","))); |
| | | } |
| | | } |
| | |
| | | assertTrue(v20.contains("system:test:stop")); |
| | | assertFalse(v20.matches("(?s).*\\bDROP\\s+TABLE\\b.*")); |
| | | |
| | | String v31 = resource("db/migration/V31__unified_realtime_snapshots.sql"); |
| | | assertTrue(v31.contains("CREATE TABLE t_test_realtime_snapshot")); |
| | | assertTrue(v31.contains("fk_realtime_snapshot_test")); |
| | | assertTrue(v31.contains("fk_realtime_snapshot_binding")); |
| | | assertTrue(v31.contains("fk_realtime_snapshot_channel")); |
| | | assertTrue(v31.contains("fk_realtime_snapshot_collector")); |
| | | assertFalse(v31.contains("fk_snapshot_test")); |
| | | assertFalse(v31.contains("fk_snapshot_binding")); |
| | | assertFalse(v31.contains("fk_snapshot_channel")); |
| | | |
| | | String testMapper = resource("mapper/system/TTestMapper.xml"); |
| | | assertTrue(testMapper.contains("selectReceivingChannelsForAdapter")); |
| | | assertTrue(testMapper.contains("RECEPTION_RESUMED")); |
| | |
| | | import com.ruoyi.system.service.ITTestService; |
| | | import com.ruoyi.system.service.ITestDataReceptionService; |
| | | |
| | | /** 接收时确定测试归属,并以现有采样表追加保存检测柜事实。 */ |
| | | /** 接收时确定测试归属,分别保留检测柜、采集器原始事实,并形成统一实时快照。 */ |
| | | @Service |
| | | public class TestDataReceptionServiceImpl implements ITestDataReceptionService |
| | | { |