mirror of
https://github.com/dlang/phobos.git
synced 2025-04-30 07:00:37 +03:00
std.socket: Always compile slow unit tests
This commit is contained in:
parent
f712d16b0a
commit
3121a99e19
1 changed files with 8 additions and 2 deletions
10
std/socket.d
10
std/socket.d
|
@ -122,6 +122,12 @@ version (StdUnittest)
|
||||||
writefln("Ignoring std.socket(%d) test failure (likely caused by flaky environment): %s", line, e.msg);
|
writefln("Ignoring std.socket(%d) test failure (likely caused by flaky environment): %s", line, e.msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Without debug=std_socket, still compile the slow tests, just don't run them.
|
||||||
|
debug (std_socket)
|
||||||
|
private enum runSlowTests = true;
|
||||||
|
else
|
||||||
|
private enum runSlowTests = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Base exception thrown by `std.socket`.
|
/// Base exception thrown by `std.socket`.
|
||||||
|
@ -1698,7 +1704,7 @@ public:
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
debug (std_socket)
|
if (runSlowTests)
|
||||||
softUnittest({
|
softUnittest({
|
||||||
// test failing reverse lookup
|
// test failing reverse lookup
|
||||||
const InternetAddress ia = new InternetAddress("255.255.255.255", 80);
|
const InternetAddress ia = new InternetAddress("255.255.255.255", 80);
|
||||||
|
@ -2633,7 +2639,7 @@ private:
|
||||||
|
|
||||||
@safe unittest
|
@safe unittest
|
||||||
{
|
{
|
||||||
debug (std_socket)
|
if (runSlowTests)
|
||||||
softUnittest({
|
softUnittest({
|
||||||
import std.datetime.stopwatch;
|
import std.datetime.stopwatch;
|
||||||
import std.typecons;
|
import std.typecons;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue