Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
caddy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
caddy
Commits
80eb45fc
Commit
80eb45fc
authored
Nov 28, 2016
by
Matthew Holt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tls: Improve flaky test depending on CPU scheduling (I think)
parent
36f8759a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
caddytls/user_test.go
caddytls/user_test.go
+2
-2
No files found.
caddytls/user_test.go
View file @
80eb45fc
...
...
@@ -166,12 +166,12 @@ func TestGetEmail(t *testing.T) {
t
.
Fatalf
(
"Error saving user %d: %v"
,
i
,
err
)
}
// Change modified time so they're all different
, so the test becomes
deterministic
// Change modified time so they're all different
and the test becomes more
deterministic
f
,
err
:=
os
.
Stat
(
testStorage
.
user
(
eml
))
if
err
!=
nil
{
t
.
Fatalf
(
"Could not access user folder for '%s': %v"
,
eml
,
err
)
}
chTime
:=
f
.
ModTime
()
.
Add
(
-
(
time
.
Duration
(
i
)
*
time
.
Second
))
chTime
:=
f
.
ModTime
()
.
Add
(
-
(
time
.
Duration
(
i
)
*
time
.
Hour
))
// 1 second isn't always enough space!
if
err
:=
os
.
Chtimes
(
testStorage
.
user
(
eml
),
chTime
,
chTime
);
err
!=
nil
{
t
.
Fatalf
(
"Could not change user folder mod time for '%s': %v"
,
eml
,
err
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment