修复访问日志可能显示重复的问题

This commit is contained in:
GoEdgeLab
2022-04-10 18:21:52 +08:00
parent 3b01c64efd
commit 9f33aae08b
4 changed files with 13 additions and 7 deletions

View File

@@ -119,7 +119,7 @@ func TestHTTPAccessLogManager_FindTables(t *testing.T) {
}
}
func TestHTTPAccessLogManager_FindTable(t *testing.T) {
func TestHTTPAccessLogManager_FindLastTable(t *testing.T) {
var config = &dbs.DBConfig{
Driver: "mysql",
Dsn: "root:123456@tcp(127.0.0.1:3306)/db_edge_log?charset=utf8mb4&timeout=30s",
@@ -145,7 +145,7 @@ func TestHTTPAccessLogManager_FindTable(t *testing.T) {
for i := 0; i < 3; i++ {
var before = time.Now()
tableDef, err := models.SharedHTTPAccessLogManager.FindTable(db, "20220306", false)
tableDef, err := models.SharedHTTPAccessLogManager.FindLastTable(db, "20220306", false)
if err != nil {
t.Fatal(err)
}