add millisecond to timestamp in log output

This commit is contained in:
Tao Zhou
2017-08-03 17:10:50 +08:00
parent d96289a81b
commit b9117e2ff1
2 changed files with 12 additions and 5 deletions

View File

@@ -31,7 +31,7 @@ func TestFormatHeader_0(t *testing.T) {
break
}
h, _ := formatTimeHeader(tm)
if tm.Format("2006/01/02 15:04:05 ") != string(h) {
if tm.Format("2006/01/02 15:04:05.999 ") != string(h) {
t.Log(tm)
t.FailNow()
}
@@ -49,7 +49,7 @@ func TestFormatHeader_1(t *testing.T) {
break
}
h, _ := formatTimeHeader(tm)
if tm.Format("2006/01/02 15:04:05 ") != string(h) {
if tm.Format("2006/01/02 15:04:05.999 ") != string(h) {
t.Log(tm)
t.FailNow()
}