File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,8 @@ func TestSign(t *testing.T) {
5454
5555 // check that we're including signing time attribute
5656 st , err := sd2 .psd .SignerInfos [0 ].GetSigningTimeAttribute ()
57- if st .After (time .Now ().Add (time .Second )) || st .Before (time .Now ().Add (- time .Second )) {
57+ delta := 5 * time .Second
58+ if st .After (time .Now ().Add (delta )) || st .Before (time .Now ().Add (- 1 * delta )) {
5859 t .Fatal ("expected SigningTime to be now. Difference was" , st .Sub (time .Now ()))
5960 }
6061}
@@ -98,7 +99,8 @@ func TestSignDetached(t *testing.T) {
9899
99100 // check that we're including signing time attribute
100101 st , err := sd2 .psd .SignerInfos [0 ].GetSigningTimeAttribute ()
101- if st .After (time .Now ().Add (time .Second )) || st .Before (time .Now ().Add (- time .Second )) {
102+ delta := 5 * time .Second
103+ if st .After (time .Now ().Add (delta )) || st .Before (time .Now ().Add (- 1 * delta )) {
102104 t .Fatal ("expected SigningTime to be now. Difference was" , st .Sub (time .Now ()))
103105 }
104106}
You can’t perform that action at this time.
0 commit comments