docs: refine gRPC guide section numbers and add CloseAndRecv & fileStore explanations
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
package modular
|
||||
|
||||
import (
|
||||
"net"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
||||
func TestModularServerClient(t *testing.T) {
|
||||
// Find an ephemeral port
|
||||
lis, err := net.Listen("tcp", "127.0.0.1:0")
|
||||
if err != nil {
|
||||
t.Fatalf("failed to listen: %v", err)
|
||||
}
|
||||
addr := lis.Addr().String()
|
||||
lis.Close()
|
||||
|
||||
// Start server in background
|
||||
go ServerRun(addr)
|
||||
|
||||
// Wait for server to start
|
||||
time.Sleep(100 * time.Millisecond)
|
||||
|
||||
// Run client against the server
|
||||
ClientRun(addr)
|
||||
}
|
||||
Reference in New Issue
Block a user