(improvement)(Headless) Optimize return structure of MetaDiscovery interface (#986)

This commit is contained in:
LXW
2024-05-13 14:29:30 +08:00
committed by GitHub
parent 0e28d6cbcc
commit 1f4039a453
5 changed files with 64 additions and 25 deletions

View File

@@ -6,6 +6,7 @@ import com.tencent.supersonic.headless.api.pojo.request.QueryMapReq;
import com.tencent.supersonic.headless.api.pojo.response.MapInfoResp;
import com.tencent.supersonic.headless.server.service.MetaDiscoveryService;
import org.junit.Assert;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
@@ -25,9 +26,9 @@ public class MetaDiscoveryTest extends BaseTest {
queryMapReq.setDataSetNames(Collections.singletonList("超音数"));
MapInfoResp mapMeta = metaDiscoveryService.getMapMeta(queryMapReq);
Assert.assertNotNull(mapMeta);
Assert.assertNotEquals(0, mapMeta.getMapFields());
Assert.assertNotEquals(0, mapMeta.getTopFields());
Assertions.assertNotNull(mapMeta);
Assertions.assertNotEquals(0, mapMeta.getDataSetMapInfo().get("超音数").getMapFields());
Assertions.assertNotEquals(0, mapMeta.getDataSetMapInfo().get("超音数").getTopFields());
}
@Test