#2 Flatten priority (load levels): run only one job at a time #3

Open
daniel wants to merge 7 commits from feature/#2-flatten-priority-load-levels into develop
pull from: feature/#2-flatten-priority-load-levels
3 changed files with 7 additions and 3 deletions
Showing only changes of commit 8f3f61c86a - Show all commits

No files matched your search

+5 -1
View File
@@ -563,7 +563,11 @@ test "search paths point at zag.conf" {
try env.put("HOME", "/home/dan");
const paths = try searchPaths(arena.allocator(), &env);
try std.testing.expectEqualStrings("/etc/zag/zag.conf", paths[0]);
try std.testing.expectEqualStrings("/home/dan/.config/zag/zag.conf", paths[1]);
const user_path = switch (builtin.os.tag) {
.macos => "/home/dan/Library/Application Support/zag/zag.conf",
else => "/home/dan/.config/zag/zag.conf",
};
try std.testing.expectEqualStrings(user_path, paths[1]);
}
test "problems reports unknown names, bad types and ranges" {
+1 -1
View File
@@ -185,7 +185,7 @@ test "signalTree kills the whole process group" {
}
test "isAlive" {
try std.testing.expect(isAlive(std.os.linux.getpid()));
try std.testing.expect(isAlive(currentPid()));
try std.testing.expect(!isAlive(-1));
try std.testing.expect(!isAlive(0));
}
+1 -1
View File
@@ -73,7 +73,7 @@ test "stale and orphaned detection" {
j.heartbeat = now - 60 * std.time.ns_per_s;
try std.testing.expect(isStale(j, now, 30));
try std.testing.expect(isOrphaned(j, now, 30)); // pid does not exist
j.pid = std.os.linux.getpid();
j.pid = proc.currentPid();
try std.testing.expect(!isOrphaned(j, now, 30)); // alive: stale but not orphaned
j.pid = null;
try std.testing.expect(isOrphaned(j, now, 30));