mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2024-11-23 05:25:35 +03:00
-: fix qlog test on Windows
This commit is contained in:
parent
b9b42997af
commit
e96fd6e42d
2 changed files with 4 additions and 2 deletions
|
@ -112,9 +112,9 @@ func TestHome(t *testing.T) {
|
|||
|
||||
dir := prepareTestDir()
|
||||
defer func() { _ = os.RemoveAll(dir) }()
|
||||
_ = os.MkdirAll(filepath.Join(Context.getDataDir(), filterDir), 0755)
|
||||
fn := filepath.Join(dir, "AdGuardHome.yaml")
|
||||
|
||||
// Prepare the test config
|
||||
assert.True(t, ioutil.WriteFile(fn, []byte(yamlConf), 0644) == nil)
|
||||
fn, _ = filepath.Abs(fn)
|
||||
|
||||
|
|
|
@ -206,7 +206,9 @@ func (l *queryLog) getData(params getDataParams) map[string]interface{} {
|
|||
fileEntries, oldest, total := l.searchFiles(params)
|
||||
|
||||
if params.OlderThan.IsZero() {
|
||||
params.OlderThan = now
|
||||
// In case if the timer is not precise (for instance, on Windows)
|
||||
// We really want to get all records including those added just before the call
|
||||
params.OlderThan = now.Add(time.Millisecond)
|
||||
}
|
||||
|
||||
// add from memory buffer
|
||||
|
|
Loading…
Reference in a new issue