-
Notifications
You must be signed in to change notification settings - Fork 8
Description
x/diameter: No method available to close/disconnect Diameter client connection
Summary
The k6/x/diameter extension does not provide any method to close an existing Diameter connection after client.connect() is called. Once connected, the Diameter client keeps the TCP/SCTP session open for the entire duration of the k6 process, and there is no API available to terminate it gracefully or forcefully.
This makes it impossible to:
Release resources after each test iteration
Simulate reconnect scenarios
Avoid stale Diameter sessions
Perform proper teardown
This appears to be a missing feature and should be considered a bug or critical enhancement request.
Environment
k6 version: (your version)
xk6-diameter version: (your version)
OS: (Linux/Windows/Mac)
Test type: VU script using diam.Client()
import diam from 'k6/x/diameter'
export default function () {
let client = diam.Client({
requestTimeout: 5000,
enableWatchdog: false,
authApplicationId: [4],
});
client.connect("10.10.10.10:3868");
// test logic …
// ❌ No available function to close or disconnect
// client.close(); // not implemented
// client.disconnect(); // not implemented
// client.end(); // not implemented
}
Actual Behavior
The Diameter connection remains open.
There is no API to close, disconnect, or teardown the connection.
The connection is closed only when k6 exits completely, not at runtime.
This leads to:
Port exhaustion
Server-side persistent stale sessions
Inability to test DPR/DPA
Inaccurate load simulations
Expected Behavior
The Diameter client should support a method to gracefully or forcefully close a connection, such as:
client.close()
client.disconnect()
client.end()
Internally, this should:
Send Disconnect-Peer-Request (DPR) or
Receive Disconnect-Peer-Answer (DPA) or
Close socket cleanly
Or at least provide a basic transport close (TCP/SCTP Close()).