mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-12-03 02:42:19 +08:00
optimization: change the configuration file from being read globally to being read independently.
This commit is contained in:
parent
27e472bf89
commit
5f2f56bcaf
@ -16,6 +16,7 @@ package startrpc
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
|
||||
"net"
|
||||
"testing"
|
||||
"time"
|
||||
@ -25,7 +26,7 @@ import (
|
||||
)
|
||||
|
||||
// mockRpcFn is a mock gRPC function for testing.
|
||||
func mockRpcFn(client discoveryregistry.SvcDiscoveryRegistry, server *grpc.Server) error {
|
||||
func mockRpcFn(config *config.GlobalConfig, client discoveryregistry.SvcDiscoveryRegistry, server *grpc.Server) error {
|
||||
// Implement a mock gRPC service registration logic if needed
|
||||
return nil
|
||||
}
|
||||
@ -40,7 +41,8 @@ func TestStart(t *testing.T) {
|
||||
doneChan := make(chan error, 1)
|
||||
|
||||
go func() {
|
||||
err := Start(testRpcPort, testRpcRegisterName, testPrometheusPort, mockRpcFn)
|
||||
err := Start(testRpcPort, testRpcRegisterName, testPrometheusPort,
|
||||
config.NewGlobalConfig(), mockRpcFn)
|
||||
doneChan <- err
|
||||
}()
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user