Skip to content

Commit 103cb60

Browse files
authored
Merge pull request #487 from ExaWorks/batch_test_files_fix
Use uid for batch-test scheduler files stored in `/tmp` in order to a…
2 parents 966ccd7 + 0efccd4 commit 103cb60

File tree

1 file changed

+6
-3
lines changed
  • tests/plugins1/_batch_test/test

1 file changed

+6
-3
lines changed

tests/plugins1/_batch_test/test/qlib.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
#!/usr/bin/python3
22
import json
33
import logging
4+
import os
45
import tempfile
56
from datetime import timedelta, datetime
67
from pathlib import Path
78
from typing import Dict, Optional, cast
89

910
from filelock import FileLock
1011

12+
13+
uid = os.getuid()
1114
tmp = tempfile.gettempdir()
12-
lock_file = Path(tmp) / 'qlist.lock'
13-
state_file = Path(tmp) / 'qlist'
14-
log_file = Path(tmp) / 'qlist.log'
15+
lock_file = Path(tmp) / ('qlist-%s.lock' % uid)
16+
state_file = Path(tmp) / ('qlist-%s' % uid)
17+
log_file = Path(tmp) / ('qlist-%s.log' % uid)
1518
my_dir = Path(__file__).parent
1619

1720

0 commit comments

Comments
 (0)