@@ -98,13 +98,12 @@ func TestCompressMaintainMode(t *testing.T) {
98
98
isNil (err , t )
99
99
f .Close ()
100
100
101
- notify := make (chan struct {})
102
101
l := & Logger {
103
102
Compress : true ,
104
103
Filename : filename ,
105
104
MaxBackups : 1 ,
106
105
MaxSize : 100 , // megabytes
107
- notifyCompressed : notify ,
106
+ notifyCompressed : make ( chan struct {}) ,
108
107
}
109
108
defer l .Close ()
110
109
b := []byte ("boo!" )
@@ -117,7 +116,7 @@ func TestCompressMaintainMode(t *testing.T) {
117
116
err = l .Rotate ()
118
117
isNil (err , t )
119
118
120
- waitForNotify (notify , t )
119
+ waitForNotify (l . notifyCompressed , t )
121
120
122
121
// a compressed version of the log file should now exist with the correct
123
122
// mode.
@@ -148,13 +147,12 @@ func TestCompressMaintainOwner(t *testing.T) {
148
147
isNil (err , t )
149
148
f .Close ()
150
149
151
- notify := make (chan struct {})
152
150
l := & Logger {
153
151
Compress : true ,
154
152
Filename : filename ,
155
153
MaxBackups : 1 ,
156
154
MaxSize : 100 , // megabytes
157
- notifyCompressed : notify ,
155
+ notifyCompressed : make ( chan struct {}) ,
158
156
}
159
157
defer l .Close ()
160
158
b := []byte ("boo!" )
@@ -167,7 +165,7 @@ func TestCompressMaintainOwner(t *testing.T) {
167
165
err = l .Rotate ()
168
166
isNil (err , t )
169
167
170
- waitForNotify (notify , t )
168
+ waitForNotify (l . notifyCompressed , t )
171
169
172
170
// a compressed version of the log file should now exist with the correct
173
171
// owner.
0 commit comments