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

Commit 6eca4f0

Browse files
committed
Not sure why I made a helper for this in the first place...
1 parent 19b7942 commit 6eca4f0

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

test/parachain/tests/integration_test.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -168,10 +168,6 @@ impl<'a> ChildHelper<'a> {
168168
}
169169
}
170170

171-
fn tcp_port_is_open<A: net::ToSocketAddrs>(address: A) -> bool {
172-
net::TcpStream::connect(&address).is_ok()
173-
}
174-
175171
async fn wait_for_tcp<A: net::ToSocketAddrs + std::fmt::Display>(address: A) {
176172
while let Err(err) = net::TcpStream::connect(&address) {
177173
eprintln!("Waiting for {} to be up ({})...", address, err);
@@ -183,11 +179,11 @@ async fn wait_for_tcp<A: net::ToSocketAddrs + std::fmt::Display>(address: A) {
183179
#[ignore]
184180
async fn integration_test() {
185181
assert!(
186-
!tcp_port_is_open("127.0.0.1:9933"),
182+
!net::TcpStream::connect("127.0.0.1:9933").is_ok(),
187183
"tcp port is already open 127.0.0.1:9933, this test cannot be run",
188184
);
189185
assert!(
190-
!tcp_port_is_open("127.0.0.1:9934"),
186+
!net::TcpStream::connect("127.0.0.1:9934").is_ok(),
191187
"tcp port is already open 127.0.0.1:9934, this test cannot be run",
192188
);
193189

0 commit comments

Comments
 (0)