소스 검색

Fix time usage in timed_map_test

V2Ray 10 년 전
부모
커밋
70ad3d0174
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      common/collect/timed_map_test.go

+ 1 - 1
common/collect/timed_map_test.go

@@ -41,7 +41,7 @@ func TestTimedStringMap(t *testing.T) {
 	v2, ok = m.Get("Key2")
 	assert.Bool(ok).IsFalse()
 
-	m.Set("Key1", "Value1", nowSec+10)
+	m.Set("Key1", "Value1", time.Now().UTC().Unix()+10)
 	v1, ok = m.Get("Key1")
 	assert.Bool(ok).IsTrue()
 	assert.String(v1.(string)).Equals("Value1")