@@ -391,7 +391,6 @@ type testgoData struct {
391
391
tempdir string
392
392
ran bool
393
393
inParallel bool
394
- hasNet bool
395
394
stdout , stderr bytes.Buffer
396
395
execDir string // dir for tg.run
397
396
}
@@ -434,9 +433,6 @@ func (tg *testgoData) parallel() {
434
433
if tg .ran {
435
434
tg .t .Fatal ("internal testsuite error: call to parallel after run" )
436
435
}
437
- if tg .hasNet {
438
- tg .t .Fatal ("internal testsuite error: call to parallel after acquireNet" )
439
- }
440
436
for _ , e := range tg .env {
441
437
if strings .HasPrefix (e , "GOROOT=" ) || strings .HasPrefix (e , "GOPATH=" ) || strings .HasPrefix (e , "GOBIN=" ) {
442
438
val := e [strings .Index (e , "=" )+ 1 :]
@@ -449,25 +445,6 @@ func (tg *testgoData) parallel() {
449
445
tg .t .Parallel ()
450
446
}
451
447
452
- // acquireNet skips t if the network is unavailable, and otherwise acquires a
453
- // netTestSem token for t to be released at the end of the test.
454
- //
455
- // t.Parallel must not be called after acquireNet.
456
- func (tg * testgoData ) acquireNet () {
457
- tg .t .Helper ()
458
- if tg .hasNet {
459
- return
460
- }
461
-
462
- testenv .MustHaveExternalNetwork (tg .t )
463
- if netTestSem != nil {
464
- netTestSem <- struct {}{}
465
- tg .t .Cleanup (func () { <- netTestSem })
466
- }
467
- tg .setenv ("TESTGONETWORK" , "" )
468
- tg .hasNet = true
469
- }
470
-
471
448
// pwd returns the current directory.
472
449
func (tg * testgoData ) pwd () string {
473
450
tg .t .Helper ()
0 commit comments