Skip to content

Commit

Permalink
Changed window signal_test ignores to build flag
Browse files Browse the repository at this point in the history
  • Loading branch information
mktange committed Mar 10, 2018
1 parent ea5db61 commit 4ad28d2
Showing 1 changed file with 2 additions and 20 deletions.
22 changes: 2 additions & 20 deletions signals/signals_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build !windows

// Copyright 2016 Palantir Technologies. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
Expand All @@ -9,7 +11,6 @@ import (
"context"
"fmt"
"os"
"runtime"
"syscall"
"testing"
"time"
Expand All @@ -21,9 +22,6 @@ import (
)

func TestCancelOnSignalsContext(t *testing.T) {
if runtime.GOOS == "windows" {
return
}
ctx, _ := signals.CancelOnSignalsContext(context.Background(), syscall.SIGHUP)

sendSignalToCurrProcess(t, syscall.SIGHUP)
Expand All @@ -39,10 +37,6 @@ func TestCancelOnSignalsContext(t *testing.T) {
}

func TestRegisterStackTraceWriterOnSignals(t *testing.T) {
if runtime.GOOS == "windows" {
return
}

out := &bytes.Buffer{}
signals.RegisterStackTraceWriterOnSignals(out, nil, syscall.SIGHUP)

Expand All @@ -59,10 +53,6 @@ func (w errWriter) Write(p []byte) (n int, err error) {
}

func TestRegisterStackTraceWriterErrorHandler(t *testing.T) {
if runtime.GOOS == "windows" {
return
}

out := errWriter{}
var handlerErr error
errHandler := func(err error) {
Expand All @@ -84,10 +74,6 @@ func TestRegisterStackTraceWriterErrorHandler(t *testing.T) {
}

func TestUnregisterStackTraceWriterOnSignals(t *testing.T) {
if runtime.GOOS == "windows" {
return
}

out := &bytes.Buffer{}
unregister := signals.RegisterStackTraceWriterOnSignals(out, nil, syscall.SIGHUP)
unregister()
Expand All @@ -99,10 +85,6 @@ func TestUnregisterStackTraceWriterOnSignals(t *testing.T) {
}

func TestNewSignalReceiver(t *testing.T) {
if runtime.GOOS == "windows" {
return
}

c := signals.NewSignalReceiver(syscall.SIGHUP)

sendSignalToCurrProcess(t, syscall.SIGHUP)
Expand Down

0 comments on commit 4ad28d2

Please sign in to comment.