mirror of https://github.com/milvus-io/milvus.git
enhance: Set log level to INFO for integration test (#31136)
- Set log level to INFO for integration test - Improve hello_milvus integration test runtime and error check Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>pull/30657/head
parent
3574bdf858
commit
a1db0fc406
|
@ -31,6 +31,7 @@ import (
|
|||
"github.com/milvus-io/milvus/pkg/common"
|
||||
"github.com/milvus-io/milvus/pkg/log"
|
||||
"github.com/milvus-io/milvus/pkg/util/funcutil"
|
||||
"github.com/milvus-io/milvus/pkg/util/merr"
|
||||
"github.com/milvus-io/milvus/pkg/util/metric"
|
||||
"github.com/milvus-io/milvus/tests/integration"
|
||||
)
|
||||
|
@ -146,11 +147,20 @@ func (s *HelloMilvusSuite) TestHelloMilvus() {
|
|||
|
||||
searchResult, err := c.Proxy.Search(ctx, searchReq)
|
||||
|
||||
if searchResult.GetStatus().GetErrorCode() != commonpb.ErrorCode_Success {
|
||||
log.Warn("searchResult fail reason", zap.String("reason", searchResult.GetStatus().GetReason()))
|
||||
}
|
||||
err = merr.CheckRPCCall(searchResult, err)
|
||||
s.NoError(err)
|
||||
|
||||
status, err := c.Proxy.ReleaseCollection(ctx, &milvuspb.ReleaseCollectionRequest{
|
||||
CollectionName: collectionName,
|
||||
})
|
||||
err = merr.CheckRPCCall(status, err)
|
||||
s.NoError(err)
|
||||
|
||||
status, err = c.Proxy.DropCollection(ctx, &milvuspb.DropCollectionRequest{
|
||||
CollectionName: collectionName,
|
||||
})
|
||||
err = merr.CheckRPCCall(status, err)
|
||||
s.NoError(err)
|
||||
s.Equal(commonpb.ErrorCode_Success, searchResult.GetStatus().GetErrorCode())
|
||||
|
||||
log.Info("TestHelloMilvus succeed")
|
||||
}
|
||||
|
|
|
@ -25,7 +25,9 @@ import (
|
|||
|
||||
"github.com/stretchr/testify/suite"
|
||||
"go.etcd.io/etcd/server/v3/embed"
|
||||
"go.uber.org/zap/zapcore"
|
||||
|
||||
"github.com/milvus-io/milvus/pkg/log"
|
||||
"github.com/milvus-io/milvus/pkg/util/etcd"
|
||||
"github.com/milvus-io/milvus/pkg/util/paramtable"
|
||||
)
|
||||
|
@ -80,6 +82,7 @@ func (s *MiniClusterSuite) TearDownSuite() {
|
|||
}
|
||||
|
||||
func (s *MiniClusterSuite) SetupTest() {
|
||||
log.SetLevel(zapcore.InfoLevel)
|
||||
s.T().Log("Setup test...")
|
||||
// setup mini cluster to use embed etcd
|
||||
endpoints := etcd.GetEmbedEtcdEndpoints(s.EtcdServer)
|
||||
|
|
Loading…
Reference in New Issue