(t *testing.T)
| 402 | } |
| 403 | |
| 404 | func TestGRPC_GetSystemStats(t *testing.T) { |
| 405 | ctx, cancel := context.WithTimeout(sharedTestCtx.ctxWithSession, 5*time.Second) |
| 406 | defer cancel() |
| 407 | |
| 408 | nodeStats, err := sharedTestCtx.client.GetSystemStats(ctx, &common.Empty{}) |
| 409 | if err != nil { |
| 410 | t.Fatalf("Failed to get node stats: %v", err) |
| 411 | } |
| 412 | log.Println("mem_total:", nodeStats.GetMemTotal()) |
| 413 | log.Println("mem_usage:", nodeStats.GetMemUsed()) |
| 414 | log.Println("cpu_usage:", nodeStats.GetCpuUsage()) |
| 415 | log.Println("cpu_cores:", nodeStats.GetCpuCores()) |
| 416 | log.Println("incoming_bandwidth:", nodeStats.GetIncomingBandwidthSpeed()) |
| 417 | log.Println("outgoing_bandwidth:", nodeStats.GetOutgoingBandwidthSpeed()) |
| 418 | log.Println("uptime:", nodeStats.GetUptime()) |
| 419 | } |
| 420 | |
| 421 | func TestGRPC_KeepAliveTimeout(t *testing.T) { |
| 422 | // Wait for keep alive to timeout (10 seconds + buffer) |
nothing calls this directly
no test coverage detected