net: Set finalDeadline from TestDialParallel to avoid leaked sockets.
net: Set finalDeadline from TestDialParallel to avoid leaked sockets.

I've also changed TestDialSerialAsyncSpuriousConnection for consistency,
although it always computes a finalDeadline of zero.

Note that #11225 is the root cause of the socket leak; this just hides
it from the unit test by restoring the shorter timeout.

Fixes #11878

Change-Id: Ie0037dd3bce6cc81d196765375489f8c61be74c2
Reviewed-on: https://go-review.googlesource.com/12712
Reviewed-by: Russ Cox <5ad239cb8a44f659eaaee0aa1ea5b94947abe557@golang.org>
Run-TryBot: Paul Marks <094500cba884de1346030431dde3e66f76eddf37@google.com>

jonathanmarvens/go,theass/go,cookerzhu/go,mgyenik/go,cyberroadie/go,skatsuta/go,undergrowthlinear/go,jefby/go,Jordanzuo/go,parkdy/go,akutz/go,rentongzhang/go,danielsoro/go,Samurais/go,AALEKH/go,ericsnowcurrently/go,yangzhongj/go,odeke-em/go,jdeng/go,momchil-velikov/go,cainiaocome/go,vanloswang/go,binarycrusader/go,NunoEdgarGub1/go,XuYunnan/go,vanloswang/go,devpadawan/go,albertjin/golang-go,Charlesdong/go-1,JioCloud/go,xujianhai/go,malvira/go,mwhudson/go,undergrowthlinear/go,arschles/go-1,JioCloud/go,Stan-Lin-/go,g522342435/go,rachtsingh/gogojuice,NunoEdgarGub1/go,Stan-Lin-/go,b54898533/go,miolini/go,beealone/go,akutz/go,famorted/go,slavau/go,ericsnowcurrently/go,danielsoro/go,dterei/go,akutz/go,rentongzhang/go,myPublicGit/go,willjunspecial/go,yangzhongj/go,binarycrusader/go,yasarkunduz/go,chinanjjohn2012/go,chinanjjohn2012/go,yuhengye/go,gdey/go,CarterTsai/go,wangfakang/go-1,mdp/go,wangfakang/go-1,likesea/go,samanalysis/go,arschles/golang-go,miolini/go,NunoEdgarGub1/go,jdhenke/go,springning/go,WIZARD-CXY/go,jdeng/go,jonasi/go,jacobhaven/go,jonathanmarvens/go,CodyGuo/go,shazow/go,golang/go,binarycrusader/go,goodlang/good,theif519/go,ObjectiveJoe/go,mdp/go,polyverse-security/go,josharian/go,cloudrain21/go,uileyar/go,yasarkunduz/go,xiaobodu/go,cloudflare/go,wangfakang/go-1,Young55555/go,ganboing/go-esx,CarterTsai/go,Cofyc/go,Stan-Lin-/go,xujianhai/go,snowsnail/go,cainiaocome/go,sndnvaps/go,shines77/go,GeorgiCodes/go,AALEKH/go,shines77/go,NichoZhang/go,CiscoCloud/go,suncycheng/go,miolini/go,theif519/go,skotti/go,b54898533/go,parkdy/go,Jordanzuo/go,4ad/go,xiaobodu/go,monetate/go,lihuanghai/go,zouchao2010/go,wangfakang/go-1,cainiaocome/go,youprofit/go,jonasi/go,golang/go,Pulgafree/go,jdhenke/go,cloudflare/go,cloudflare/go,g522342435/go,deft-code/go,jacobxk/go,chinanjjohn2012/go,arschles/golang-go,jonahglover/go,suncycheng/go,kim-racktop/go,ErikDubbelboer/go,cainiaocome/go,jacobsa/go,devpadawan/go,danycoro/go,ImJasonH/go,4ad/go,g522342435/go,jacobhaven/go,shazow/go,ichu501/go,jameskumar/go,snowsnail/go,jdhenke/go,jefby/go,codestation/go,mikekap/go,xiaobodu/go,xujianhai/go,AALEKH/go,suncycheng/go,andrewchambers/go,kevinc0825/go,Badredapple/go,JioCloud/go,xiuzhifu/go,skatsuta/go,ObjectiveJoe/go,baiyunping333/go,fjballest/golang,arschles/golang-go,golang/go,danycoro/go,roth1002/go,sosop/go,jonasi/go,zcwfeng/go,derekmarcotte/go,rachtsingh/gogojuice,skatsuta/go,vanloswang/go,jasonxiong/go,zouchao2010/go,likesea/go,sosop/go,cloudrain21/go,zhangg/go,goodlang/good,rachtsingh/gogojuice,shazow/go,WIZARD-CXY/go,yangzhongj/go,jonahglover/go,vanloswang/go,xiuzhifu/go,snowsnail/go,nakedgc/go,constantine001/go,CiscoCloud/go,greyhwndz/go,Endika/go,ifagnosticism/go,jacobsa/go,jefby/go,ganboing/go-esx,xujianhai/go,GeorgiCodes/go,dterei/go,ImJasonH/go,goodlang/good,vishsingh/go,qskycolor/go,momchil-velikov/go,constantine001/go,miolini/go,beealone/go,codestation/go,CiscoCloud/go,skatsuta/go,cookerzhu/go,cyberroadie/go,myPublicGit/go,danycoro/go,vsdutka/go,willjunspecial/go,WIZARD-CXY/go,akutz/go,golang/go,arschles/go-1,Badredapple/go,dafyddcrosby/go,goodlang/good,xiaobodu/go,arschles/go-1,jonahglover/go,Cofyc/go,jacobhaven/go,alash3al/go,theass/go,jonasi/go,roth1002/go,mgyenik/go,fjballest/golang,Pulgafree/go,slavau/go,devpadawan/go,alex-zhang/go,andrewchambers/go,xinhuang327/go,slavau/go,Badredapple/go,ImJasonH/go,chinanjjohn2012/go,beealone/go,linux-on-ibm-z/go,sinuos/go,XuYunnan/go,kim-racktop/go,jasonxiong/go,cloudrain21/go,ifagnosticism/go,kakuhiroshi/go,NichoZhang/go,XuYunnan/go,ericsnowcurrently/go,derekmarcotte/go,mbrukman/go,monetate/go,theass/go,JioCloud/go,shazow/go,CiscoCloud/go,Jordanzuo/go,parkdy/go,zhangg/go,danycoro/go,fjballest/golang,nawawi/go,fjballest/golang,momchil-velikov/go,jefby/go,skatsuta/go,wangfakang/go-1,gdey/go,roth1002/go,josharian/go,jonasi/go,greyhwndz/go,sndnvaps/go,mwhudson/go,sosop/go,gohin/go,zcwfeng/go,albertjin/golang-go,honsiorovskyi/go,danielsoro/go,devpadawan/go,vsdutka/go,4ad/go,CodyGuo/go,AALEKH/go,josharian/go,ichu501/go,theif519/go,ImJasonH/go,NunoEdgarGub1/go,xujianhai/go,Cofyc/go,WIZARD-CXY/go,jacobhaven/go,kevinc0825/go,danielsoro/go,dpatel06/go,jefby/go,CAFxX/go,CarterTsai/go,mbrukman/go,jefby/go,skotti/go,danycoro/go,lihuanghai/go,zcwfeng/go,cloudrain21/go,kevinc0825/go,danycoro/go,malvira/go,skatsuta/go,youprofit/go,baiyunping333/go,willjunspecial/go,Samurais/go,jdeng/go,Endika/go,parkdy/go,alash3al/go,kakuhiroshi/go,jacobxk/go,parkdy/go,likesea/go,ichu501/go,shazow/go,theass/go,dafyddcrosby/go,gohin/go,andrewchambers/go,monetate/go,dafyddcrosby/go,qskycolor/go,snowsnail/go,CiscoCloud/go,monetate/go,vanloswang/go,odeke-em/go,willjunspecial/go,kakuhiroshi/go,cyberroadie/go,arschles/go-1,gdey/go,donnel6809/go,danielsoro/go,XuYunnan/go,ErikDubbelboer/go,mbrukman/go,odeke-em/go,nakedgc/go,JioCloud/go,Jordanzuo/go,shazow/go,kevinc0825/go,youprofit/go,ericsnowcurrently/go,arschles/go-1,nawawi/go,skotti/go,lihuanghai/go,mikekap/go,polyverse-security/go,jonathanmarvens/go,GeorgiCodes/go,WIZARD-CXY/go,wangfakang/go-1,fjballest/golang,snowsnail/go,albertjin/golang-go,vsekhar/elastic-go,kakuhiroshi/go,4ad/go,shines77/go,mgyenik/go,CarterTsai/go,odeke-em/go,samanalysis/go,myPublicGit/go,xiuzhifu/go,jasonxiong/go,arschles/golang-go,polyverse-security/go,alex-zhang/go,beealone/go,codestation/go,xinhuang327/go,christopher-henderson/Go,vishsingh/go,yuhengye/go,undergrowthlinear/go,Young55555/go,linux-on-ibm-z/go,devpadawan/go,Pulgafree/go,skatsuta/go,Charlesdong/go-1,g522342435/go,mgyenik/go,odeke-em/go,gdey/go,polyverse-security/go,gohin/go,danielsoro/go,ganboing/go-esx,Endika/go,vsdutka/go,famorted/go,Charlesdong/go-1,odeke-em/go,g522342435/go,miolini/go,mdp/go,zcwfeng/go,Jordanzuo/go,undergrowthlinear/go,rachtsingh/gogojuice,skotti/go,vsekhar/elastic-go,ErikDubbelboer/go,sinuos/go,uileyar/go,skotti/go,donnel6809/go,uileyar/go,Badredapple/go,ImJasonH/go,youprofit/go,vsekhar/elastic-go,willjunspecial/go,stormltf/go,deft-code/go,AALEKH/go,CiscoCloud/go,vishsingh/go,andrewchambers/go,mdp/go,CodyGuo/go,nawawi/go,gdey/go,cloudrain21/go,shazow/go,zcwfeng/go,sinuos/go,mikekap/go,jonathanmarvens/go,leeric92/go,sndnvaps/go,NichoZhang/go,vsdutka/go,rentongzhang/go,Endika/go,famorted/go,fjballest/golang,andrewchambers/go,CAFxX/go,jonathanmarvens/go,kakuhiroshi/go,odeke-em/go,theass/go,mwhudson/go,Jordanzuo/go,ObjectiveJoe/go,springning/go,jmptrader/go,cainiaocome/go,NunoEdgarGub1/go,sndnvaps/go,jonahglover/go,ErikDubbelboer/go,jacobhaven/go,malvira/go,springning/go,NunoEdgarGub1/go,b54898533/go,dterei/go,lihuanghai/go,CAFxX/go,slavau/go,greyhwndz/go,stormltf/go,NichoZhang/go,sosop/go,roth1002/go,dterei/go,vanloswang/go,ifagnosticism/go,Young55555/go,joshsammut/go,jmptrader/go,sndnvaps/go,cookerzhu/go,xinhuang327/go,vanloswang/go,derekmarcotte/go,jonasi/go,sosop/go,mdp/go,4ad/go,mwhudson/go,mwhudson/go,vishsingh/go,arschles/go-1,arschles/go-1,mbrukman/go,ObjectiveJoe/go,CarterTsai/go,andrewchambers/go,alex-zhang/go,jdeng/go,zhangg/go,4ad/go,mgyenik/go,derekmarcotte/go,jdhenke/go,gohin/go,GeorgiCodes/go,undergrowthlinear/go,xinhuang327/go,yasarkunduz/go,kim-racktop/go,slavau/go,theass/go,ericsnowcurrently/go,sinuos/go,josharian/go,snowsnail/go,xiaobodu/go,nakedgc/go,zouchao2010/go,cainiaocome/go,vsekhar/elastic-go,codestation/go,jonahglover/go,codestation/go,mwhudson/go,lihuanghai/go,binarycrusader/go,theass/go,ericsnowcurrently/go,miolini/go,CarterTsai/go,Cofyc/go,baiyunping333/go,alash3al/go,nawawi/go,snowsnail/go,CarterTsai/go,likesea/go,vsekhar/elastic-go,springning/go,famorted/go,uileyar/go,roth1002/go,CAFxX/go,ObjectiveJoe/go,CodyGuo/go,XuYunnan/go,springning/go,golang/go,donnel6809/go,jacobxk/go,jameskumar/go,ErikDubbelboer/go,monetate/go,constantine001/go,jacobhaven/go,dterei/go,malvira/go,willjunspecial/go,danycoro/go,jacobsa/go,ErikDubbelboer/go,albertjin/golang-go,Endika/go,momchil-velikov/go,polyverse-security/go,dafyddcrosby/go,likesea/go,nawawi/go,linux-on-ibm-z/go,theif519/go,linux-on-ibm-z/go,lihuanghai/go,youprofit/go,undergrowthlinear/go,Young55555/go,CAFxX/go,derekmarcotte/go,mbrukman/go,sosop/go,skotti/go,shines77/go,slavau/go,deft-code/go,josharian/go,mgyenik/go,jdeng/go,parkdy/go,NichoZhang/go,vsdutka/go,CarterTsai/go,Charlesdong/go-1,derekmarcotte/go,albertjin/golang-go,jmptrader/go,roth1002/go,leeric92/go,jonathanmarvens/go,malvira/go,deft-code/go,vsekhar/elastic-go,xinhuang327/go,samanalysis/go,yangzhongj/go,miolini/go,dterei/go,jmptrader/go,qskycolor/go,stormltf/go,jacobxk/go,devpadawan/go,uileyar/go,cookerzhu/go,jdeng/go,CAFxX/go,famorted/go,mbrukman/go,roth1002/go,vsekhar/elastic-go,famorted/go,NunoEdgarGub1/go,kim-racktop/go,greyhwndz/go,Pulgafree/go,rentongzhang/go,nakedgc/go,yasarkunduz/go,honsiorovskyi/go,sinuos/go,cloudrain21/go,yasarkunduz/go,ErikDubbelboer/go,alex-zhang/go,snowsnail/go,Young55555/go,zcwfeng/go,yuhengye/go,beealone/go,andrewchambers/go,ericsnowcurrently/go,vsekhar/elastic-go,ganboing/go-esx,skotti/go,nawawi/go,likesea/go,momchil-velikov/go,Cofyc/go,arschles/golang-go,Samurais/go,goodlang/good,arschles/golang-go,rentongzhang/go,linux-on-ibm-z/go,ganboing/go-esx,xiuzhifu/go,likesea/go,joshsammut/go,baiyunping333/go,undergrowthlinear/go,constantine001/go,Jordanzuo/go,Badredapple/go,kevinc0825/go,alex-zhang/go,binarycrusader/go,vanloswang/go,deft-code/go,jacobxk/go,mwhudson/go,cookerzhu/go,derekmarcotte/go,g522342435/go,dterei/go,arschles/golang-go,ichu501/go,kim-racktop/go,baiyunping333/go,mdp/go,jameskumar/go,kim-racktop/go,ichu501/go,zhangg/go,CodyGuo/go,dafyddcrosby/go,Cofyc/go,shines77/go,Charlesdong/go-1,jacobsa/go,zouchao2010/go,zouchao2010/go,ObjectiveJoe/go,sosop/go,qskycolor/go,nakedgc/go,mikekap/go,alash3al/go,springning/go,ganboing/go-esx,rentongzhang/go,cyberroadie/go,qskycolor/go,vishsingh/go,momchil-velikov/go,Pulgafree/go,springning/go,jasonxiong/go,fjballest/golang,honsiorovskyi/go,leeric92/go,yasarkunduz/go,xinhuang327/go,alash3al/go,shines77/go,josharian/go,wangfakang/go-1,honsiorovskyi/go,alash3al/go,GeorgiCodes/go,joshsammut/go,stormltf/go,zcwfeng/go,JioCloud/go,yasarkunduz/go,theif519/go,mdp/go,ifagnosticism/go,qskycolor/go,monetate/go,mgyenik/go,arschles/go-1,JioCloud/go,sosop/go,jacobsa/go,jonasi/go,linux-on-ibm-z/go,rachtsingh/gogojuice,jameskumar/go,jdhenke/go,malvira/go,jmptrader/go,jameskumar/go,leeric92/go,malvira/go,goodlang/good,cookerzhu/go,theif519/go,ichu501/go,jacobxk/go,vsdutka/go,monetate/go,leeric92/go,undergrowthlinear/go,stormltf/go,alash3al/go,ImJasonH/go,vishsingh/go,joshsammut/go,sndnvaps/go,WIZARD-CXY/go,sinuos/go,youprofit/go,golang/go,gohin/go,Cofyc/go,Young55555/go,mwhudson/go,akutz/go,donnel6809/go,CodyGuo/go,Endika/go,cyberroadie/go,XuYunnan/go,cloudrain21/go,jonasi/go,suncycheng/go,shines77/go,golang/go,ericsnowcurrently/go,famorted/go,albertjin/golang-go,fjballest/golang,willjunspecial/go,skotti/go,yuhengye/go,jacobhaven/go,CAFxX/go,dpatel06/go,lihuanghai/go,greyhwndz/go,jefby/go,yuhengye/go,jmptrader/go,stormltf/go,dafyddcrosby/go,yangzhongj/go,binarycrusader/go,codestation/go,stormltf/go,golang/go,cookerzhu/go,gohin/go,CiscoCloud/go,akutz/go,jonahglover/go,ichu501/go,yuhengye/go,baiyunping333/go,samanalysis/go,jdhenke/go,yangzhongj/go,codestation/go,uileyar/go,constantine001/go,samanalysis/go,NichoZhang/go,suncycheng/go,Jordanzuo/go,chinanjjohn2012/go,jameskumar/go,kevinc0825/go,Stan-Lin-/go,youprofit/go,donnel6809/go,g522342435/go,nakedgc/go,joshsammut/go,parkdy/go,lihuanghai/go,jacobxk/go,rachtsingh/gogojuice,mdp/go,codestation/go,beealone/go,xiuzhifu/go,zouchao2010/go,famorted/go,chinanjjohn2012/go,samanalysis/go,parkdy/go,donnel6809/go,suncycheng/go,sinuos/go,dpatel06/go,akutz/go,Pulgafree/go,mbrukman/go,malvira/go,theass/go,honsiorovskyi/go,vsdutka/go,linux-on-ibm-z/go,myPublicGit/go,constantine001/go,nawawi/go,deft-code/go,cainiaocome/go,alex-zhang/go,sinuos/go,linux-on-ibm-z/go,momchil-velikov/go,Stan-Lin-/go,jmptrader/go,theif519/go,xujianhai/go,skatsuta/go,jonathanmarvens/go,cloudflare/go,gdey/go,jonahglover/go,devpadawan/go,WIZARD-CXY/go,Samurais/go,WIZARD-CXY/go,AALEKH/go,derekmarcotte/go,leeric92/go,kakuhiroshi/go,leeric92/go,zouchao2010/go,willjunspecial/go,CAFxX/go,Charlesdong/go-1,xiaobodu/go,devpadawan/go,nakedgc/go,baiyunping333/go,xiaobodu/go,yuhengye/go,GeorgiCodes/go,jdeng/go,nakedgc/go,Badredapple/go,zhangg/go,vsdutka/go,albertjin/golang-go,Cofyc/go,Endika/go,shazow/go,dafyddcrosby/go,arschles/golang-go,jameskumar/go,joshsammut/go,myPublicGit/go,dafyddcrosby/go,cloudflare/go,shines77/go,albertjin/golang-go,ichu501/go,youprofit/go,kim-racktop/go,greyhwndz/go,ifagnosticism/go,binarycrusader/go,roth1002/go,samanalysis/go,cloudrain21/go,jacobsa/go,samanalysis/go,AALEKH/go,Stan-Lin-/go,xiuzhifu/go,Samurais/go,odeke-em/go,likesea/go,qskycolor/go,rachtsingh/gogojuice,xujianhai/go,jasonxiong/go,mikekap/go,dterei/go,dpatel06/go,dpatel06/go,yangzhongj/go,jameskumar/go,b54898533/go,xiuzhifu/go,ganboing/go-esx,polyverse-security/go,GeorgiCodes/go,constantine001/go,Samurais/go,theif519/go,andrewchambers/go,Endika/go,greyhwndz/go,Young55555/go,ObjectiveJoe/go,jasonxiong/go,Stan-Lin-/go,Young55555/go,polyverse-security/go,jonathanmarvens/go,cyberroadie/go,jasonxiong/go,beealone/go,vishsingh/go,NichoZhang/go,Pulgafree/go,vishsingh/go,alash3al/go,sndnvaps/go,gohin/go,jefby/go,b54898533/go,b54898533/go,sndnvaps/go,greyhwndz/go,Charlesdong/go-1,xujianhai/go,leeric92/go,suncycheng/go,yuhengye/go,yangzhongj/go,AALEKH/go,zhangg/go,cyberroadie/go,honsiorovskyi/go,ImJasonH/go,b54898533/go,Samurais/go,jacobxk/go,GeorgiCodes/go,beealone/go,mikekap/go,polyverse-security/go,JioCloud/go,binarycrusader/go,myPublicGit/go,cloudflare/go,Badredapple/go,rachtsingh/gogojuice,mbrukman/go,baiyunping333/go,zcwfeng/go,xinhuang327/go,monetate/go,slavau/go,cainiaocome/go,rentongzhang/go,dpatel06/go,uileyar/go,akutz/go,ImJasonH/go,NichoZhang/go,ifagnosticism/go,Charlesdong/go-1,honsiorovskyi/go,b54898533/go,xinhuang327/go,zouchao2010/go,Samurais/go,chinanjjohn2012/go,XuYunnan/go,jacobsa/go,CiscoCloud/go,kakuhiroshi/go,jdhenke/go,kim-racktop/go,donnel6809/go,Stan-Lin-/go,honsiorovskyi/go,Pulgafree/go,josharian/go,stormltf/go,4ad/go,alex-zhang/go,uileyar/go,wangfakang/go-1,cyberroadie/go,cookerzhu/go,dpatel06/go,kevinc0825/go,qskycolor/go,g522342435/go,deft-code/go,ganboing/go-esx,CodyGuo/go,joshsammut/go,joshsammut/go,ifagnosticism/go,4ad/go,dpatel06/go,XuYunnan/go,mgyenik/go,kevinc0825/go,rentongzhang/go,goodlang/good,jdeng/go,ifagnosticism/go,jacobhaven/go,gohin/go,danycoro/go,donnel6809/go,zhangg/go,momchil-velikov/go,danielsoro/go,suncycheng/go,springning/go,gdey/go,jonahglover/go,CodyGuo/go,Badredapple/go,jdhenke/go,ObjectiveJoe/go,jmptrader/go,constantine001/go,xiuzhifu/go,danielsoro/go,zhangg/go,jasonxiong/go,deft-code/go,chinanjjohn2012/go,goodlang/good,alex-zhang/go,yasarkunduz/go,nawawi/go,myPublicGit/go,mikekap/go,cloudflare/go,cloudflare/go,NunoEdgarGub1/go,xiaobodu/go,slavau/go,miolini/go,josharian/go,ErikDubbelboer/go,myPublicGit/go,mikekap/go,kakuhiroshi/go,jacobsa/go,gdey/go