Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

companion for #13384 #6987

Merged
merged 15 commits into from
May 4, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions node/test/service/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,18 +190,14 @@ pub fn node_config(
offchain_worker: sc_client_api::ExecutionStrategy::NativeWhenPossible,
other: sc_client_api::ExecutionStrategy::NativeWhenPossible,
},
rpc_http: None,
rpc_ws: None,
rpc_ipc: None,
rpc_max_payload: None,
rpc_addr: None,
rpc_max_request_size: None,
rpc_max_response_size: None,
rpc_ws_max_connections: None,
rpc_max_connections: None,
rpc_cors: None,
rpc_methods: Default::default(),
rpc_id_provider: None,
rpc_max_subs_per_conn: None,
ws_max_out_buffer_capacity: None,
prometheus_config: None,
telemetry_endpoints: None,
default_heap_pages: None,
Expand Down
6 changes: 2 additions & 4 deletions tests/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,13 @@ pub fn find_ws_url_from_output(read: impl Read + Send) -> (String, String) {
data.push_str(&line);

// does the line contain our port (we expect this specific output from substrate).
let sock_addr = match line.split_once("Running JSON-RPC WS server: addr=") {
let sock_addr = match line.split_once("Running JSON-RPC server: addr=") {
None => return None,
Some((_, after)) => after.split_once(',').unwrap().0,
};

Some(format!("ws://{}", sock_addr))
})
.unwrap_or_else(|| {
panic!("Could not find WebSocket address in process output:\n{}", &data)
});
.unwrap_or_else(|| panic!("Could not find address in process output:\n{}", &data));
(ws_url, data)
}