How come unittesting std.socket takes 46 seconds?
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Sat May 1 18:14:33 UTC 2021
On 5/1/21 11:30 AM, Vladimir Panteleev wrote:
> On Saturday, 1 May 2021 at 15:01:31 UTC, Andrei Alexandrescu wrote:
>> The second longest unittest is like 1.5 seconds.
>
> ~/work/extern/D/phobos/std » dmd -main -unittest -version=StdUnittest
> socket.d && time ./socket
> 1 modules passed unittests
> ./socket 0.05s user 0.15s system 92% cpu 0.211 total
>
> Between this and your AUTO_BOOTSTRAP woes, my most likely guess is that
> there is something wrong with your computer.
>
>> I assume it goes outbound and initiates actual connections. A unittest
>> should not connect to other hosts than localhost.
>
> Unfortunately that's not possible for things like testing DNS.
A special dedicated test mode should be for that. Routine unittests
should not connect to the network.
More information about the Digitalmars-d
mailing list