test(gateway): measure qualification wire capacity
Verify Data Plane / gateway (push) Successful in 4m46s

This commit is contained in:
sechmachine
2026-08-09 23:01:42 +07:00
parent 122080ab34
commit 22433e5c45
7 changed files with 176 additions and 24 deletions
+9 -1
View File
@@ -940,12 +940,20 @@ func (c *independentGatewayClient) ReceiveFrame(ctx context.Context) (Frame, err
}
func (c *independentGatewayClient) ReceiveMedia(ctx context.Context) ([]byte, error) {
return c.receiveMedia(ctx, nil)
}
func (c *independentGatewayClient) receiveMedia(ctx context.Context, observe func(time.Time, int)) ([]byte, error) {
for {
data, err := c.connection.ReceiveDatagram(ctx)
if err != nil {
return nil, err
}
payload, complete, err := c.media.Add(data, time.Now())
receivedAt := time.Now()
if observe != nil {
observe(receivedAt, len(data))
}
payload, complete, err := c.media.Add(data, receivedAt)
if err != nil {
return nil, err
}