Test fixes for Windows
This commit is contained in:
parent
dee985f9bd
commit
702b2c77a0
|
@ -592,6 +592,7 @@ func TestPieceCompletedInStorageButNotClient(t *testing.T) {
|
|||
cfg.DataDir = greetingTempDir
|
||||
seeder, err := NewClient(TestingConfig(t))
|
||||
require.NoError(t, err)
|
||||
defer seeder.Close()
|
||||
seeder.AddTorrentSpec(&TorrentSpec{
|
||||
InfoBytes: greetingMetainfo.InfoBytes,
|
||||
})
|
||||
|
|
|
@ -12,8 +12,10 @@ import (
|
|||
|
||||
func TestHashPieceAfterStorageClosed(t *testing.T) {
|
||||
td := t.TempDir()
|
||||
cs := storage.NewFile(td)
|
||||
defer cs.Close()
|
||||
tt := &Torrent{
|
||||
storageOpener: storage.NewClient(storage.NewFile(td)),
|
||||
storageOpener: storage.NewClient(cs),
|
||||
logger: log.Default,
|
||||
chunkSize: defaultChunkSize,
|
||||
}
|
||||
|
|
|
@ -71,5 +71,11 @@ func TestListenLocalhostNetwork(t *testing.T) {
|
|||
testListenerNetwork(t, listenUtpListener, "udp", "udp6", "[::]:0", false)
|
||||
testListenerNetwork(t, listenUtpListener, "udp", "udp4", "localhost:0", true)
|
||||
|
||||
testAcceptedConnAddr(t, "tcp", false, dialClosure(net.Dial, "tcp"), listenClosure(net.Listen, "tcp6", ":0"))
|
||||
testAcceptedConnAddr(
|
||||
t,
|
||||
"tcp",
|
||||
false,
|
||||
dialClosure(net.Dial, "tcp"),
|
||||
listenClosure(net.Listen, "tcp6", "localhost:0"),
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue