Add unittest and fix a bug in segment manager

Signed-off-by: neza2017 <yefu.chen@zilliz.com>
pull/4973/head^2
neza2017 2020-11-21 17:53:05 +08:00 committed by yefu.chen
parent 3afab6ecb9
commit dab1afa3cc
6 changed files with 27 additions and 7 deletions

View File

@ -7,7 +7,8 @@
"remoteUser": "debugger", "remoteUser": "debugger",
"remoteEnv": {"CCACHE_COMPILERCHECK":"content", "CCACHE_MAXSIZE": "2G", "CCACHE_COMPRESS": "1", "CCACHE_COMPRESSLEVEL": "5"}, "remoteEnv": {"CCACHE_COMPILERCHECK":"content", "CCACHE_MAXSIZE": "2G", "CCACHE_COMPRESS": "1", "CCACHE_COMPRESSLEVEL": "5"},
"extensions": [ "extensions": [
"ms-vscode.cpptools", "ms-vscode.cmake-tools",
"golang.go" "ms-vscode.cpptools",
] "golang.go"
]
} }

4
.env
View File

@ -3,6 +3,6 @@ ARCH=amd64
UBUNTU=18.04 UBUNTU=18.04
DATE_VERSION=20201120-092740 DATE_VERSION=20201120-092740
LATEST_DATE_VERSION=latest LATEST_DATE_VERSION=latest
PULSAR_ADDRESS=pulsar://localhost:6650 PULSAR_ADDRESS=pulsar://pulsar:6650
ETCD_ADDRESS=localhost:2379 ETCD_ADDRESS=etcd:2379
MASTER_ADDRESS=localhost:53100 MASTER_ADDRESS=localhost:53100

View File

@ -57,7 +57,7 @@ jobs:
- name: Start Service - name: Start Service
shell: bash shell: bash
run: | run: |
cd ${GITHUB_WORKSPACE}/deployments/docker && docker-compose up -d cd ${GITHUB_WORKSPACE}/deployments/docker && docker-compose -p milvus-distributed up -d
- name: Build and UnitTest - name: Build and UnitTest
env: env:
CHECK_BUILDER: "1" CHECK_BUILDER: "1"

View File

@ -8,6 +8,8 @@ services:
- "2379:2379" - "2379:2379"
- "2380:2380" - "2380:2380"
- "4001:4001" - "4001:4001"
networks:
- milvus
pulsar: pulsar:
image: apachepulsar/pulsar:latest image: apachepulsar/pulsar:latest
@ -15,6 +17,11 @@ services:
ports: ports:
- "6650:6650" - "6650:6650"
- "18080:8080" - "18080:8080"
networks:
- milvus
networks:
milvus:
# pd0: # pd0:
# image: pingcap/pd:latest # image: pingcap/pd:latest

View File

@ -10,7 +10,6 @@ x-ccache: &ccache
services: services:
ubuntu: ubuntu:
image: ${REPO}:${ARCH}-ubuntu${UBUNTU}-${DATE_VERSION} image: ${REPO}:${ARCH}-ubuntu${UBUNTU}-${DATE_VERSION}
network_mode: "host"
build: build:
context: . context: .
dockerfile: build/docker/env/cpu/ubuntu${UBUNTU}/Dockerfile dockerfile: build/docker/env/cpu/ubuntu${UBUNTU}/Dockerfile
@ -29,6 +28,8 @@ services:
command: &ubuntu-command > command: &ubuntu-command >
/bin/bash -c " /bin/bash -c "
make check-proto-product && make verifiers && make unittest" make check-proto-product && make verifiers && make unittest"
networks:
- milvus
gdbserver: gdbserver:
image: ${REPO}:${ARCH}-ubuntu${UBUNTU}-${DATE_VERSION} image: ${REPO}:${ARCH}-ubuntu${UBUNTU}-${DATE_VERSION}
@ -52,3 +53,8 @@ services:
ports: ports:
- "7776:22" - "7776:22"
- "7777:7777" - "7777:7777"
networks:
- milvus
networks:
milvus:

View File

@ -11,3 +11,9 @@ formatThis() {
formatThis "${CorePath}/src" formatThis "${CorePath}/src"
formatThis "${CorePath}/unittest" formatThis "${CorePath}/unittest"
if test -z "$(git status | grep -E "*\.c|*\.h")"; then
exit 0
else
echo "Please format your code by clang-format!"
exit 1
fi