From 2735be8015b7257807c3f2692376b1df25384325 Mon Sep 17 00:00:00 2001 From: Ashley Coleman Date: Tue, 30 Jul 2024 11:12:14 -0700 Subject: [PATCH] lsc: Delete flaky and unused test --- tests/job-cache/basic-ttl/.wakeroot | 6 -- tests/job-cache/basic-ttl/pass.sh | 108 ---------------------------- tests/job-cache/basic-ttl/test.wake | 11 --- 3 files changed, 125 deletions(-) delete mode 100644 tests/job-cache/basic-ttl/.wakeroot delete mode 100755 tests/job-cache/basic-ttl/pass.sh delete mode 100644 tests/job-cache/basic-ttl/test.wake diff --git a/tests/job-cache/basic-ttl/.wakeroot b/tests/job-cache/basic-ttl/.wakeroot deleted file mode 100644 index 887cda1b2..000000000 --- a/tests/job-cache/basic-ttl/.wakeroot +++ /dev/null @@ -1,6 +0,0 @@ -{ - "eviction_config": { - "type": "ttl", - "seconds_to_live": 6, - } -} diff --git a/tests/job-cache/basic-ttl/pass.sh b/tests/job-cache/basic-ttl/pass.sh deleted file mode 100755 index 90c0f56fe..000000000 --- a/tests/job-cache/basic-ttl/pass.sh +++ /dev/null @@ -1,108 +0,0 @@ -#! /bin/sh - -set -e -WAKE="${1:+$1/wake}" -rm wake.db 2> /dev/null || true -rm -rf .cache-hit 2> /dev/null || true -rm -rf .cache-misses 2> /dev/null || true -rm -rf .job-cache 2> /dev/null || true -rm one.txt 2> /dev/null || true -rm two.txt 2> /dev/null || true -rm three.txt 2> /dev/null || true -rm four.txt 2> /dev/null || true -WAKE_SHARED_CACHE_FAST_CLOSE=1 DEBUG_WAKE_SHARED_CACHE=1 WAKE_LOCAL_JOB_CACHE=.job-cache "${WAKE:-wake}" test one -rm wake.db -rm -rf .cache-misses -sleep 1 -WAKE_SHARED_CACHE_FAST_CLOSE=1 DEBUG_WAKE_SHARED_CACHE=1 WAKE_LOCAL_JOB_CACHE=.job-cache "${WAKE:-wake}" test two -rm wake.db -rm -rf .cache-misses -sleep 1 -WAKE_SHARED_CACHE_FAST_CLOSE=1 DEBUG_WAKE_SHARED_CACHE=1 WAKE_LOCAL_JOB_CACHE=.job-cache "${WAKE:-wake}" test three -rm wake.db -rm -rf .cache-misses -sleep 1 - -# We should still be under the limit here. This is to ensure we mark test one as used -WAKE_SHARED_CACHE_FAST_CLOSE=1 DEBUG_WAKE_SHARED_CACHE=1 WAKE_LOCAL_JOB_CACHE=.job-cache "${WAKE:-wake}" test one -rm wake.db -rm -rf .cache-misses -if [ -z "$(ls -A .cache-hit)" ]; then - echo "No cache hit found" - exit 1 -fi -sleep 4 - -# Now we're going to go over. Hopefully dropping two and three, but keeping one and four -WAKE_SHARED_CACHE_FAST_CLOSE=1 DEBUG_WAKE_SHARED_CACHE=1 WAKE_LOCAL_JOB_CACHE=.job-cache "${WAKE:-wake}" test one -rm wake.db -rm -rf .cache-misses - -# Now make sure we still get a hit on 1 -rm -rf .cache-hit 2> /dev/null || true -WAKE_SHARED_CACHE_FAST_CLOSE=1 DEBUG_WAKE_SHARED_CACHE=1 WAKE_LOCAL_JOB_CACHE=.job-cache "${WAKE:-wake}" test three -rm wake.db -if [ -z "$(ls -A .cache-hit)" ]; then - echo "No cache hit found" - exit 1 -fi -if [ -d ".cache-misses" ]; then - echo "Found a cache miss" - exit 1 -fi -sleep 1 - - -# And check that we get misses on four and three -WAKE_SHARED_CACHE_FAST_CLOSE=1 DEBUG_WAKE_SHARED_CACHE=1 WAKE_LOCAL_JOB_CACHE=.job-cache "${WAKE:-wake}" test two -rm wake.db -if [ -z "$(ls -A .cache-misses)" ]; then - echo "Expected a cache miss!!" - exit 1 -fi -rm -rf .cache-misses -sleep 1 - - -WAKE_SHARED_CACHE_FAST_CLOSE=1 DEBUG_WAKE_SHARED_CACHE=1 WAKE_LOCAL_JOB_CACHE=.job-cache "${WAKE:-wake}" test one -rm wake.db -if [ -d ".cache-misses" ]; then - echo "Found a cache miss" - exit 1 -fi -rm -rf .cache-hit - -WAKE_SHARED_CACHE_FAST_CLOSE=1 DEBUG_WAKE_SHARED_CACHE=1 WAKE_LOCAL_JOB_CACHE=.job-cache "${WAKE:-wake}" test four -rm wake.db -if [ -z "$(ls -A .cache-misses)" ]; then - echo "Expected a cache miss!!" - exit 1 -fi -rm -rf .cache-misses - - -WAKE_SHARED_CACHE_FAST_CLOSE=1 DEBUG_WAKE_SHARED_CACHE=1 WAKE_LOCAL_JOB_CACHE=.job-cache "${WAKE:-wake}" test two -rm wake.db -if [ -d ".cache-misses" ]; then - echo "Found a cache miss" - exit 1 -fi -rm -rf .cache-hit - -WAKE_SHARED_CACHE_FAST_CLOSE=1 DEBUG_WAKE_SHARED_CACHE=1 WAKE_LOCAL_JOB_CACHE=.job-cache "${WAKE:-wake}" test four -rm wake.db -if [ -z "$(ls -A .cache-hit)" ]; then - echo "No cache hit found" - exit 1 -fi -if [ -d ".cache-misses" ]; then - echo "Found a cache miss" - exit 1 -fi - - -# Cleanup -rm one.txt -rm two.txt -rm three.txt -rm four.txt diff --git a/tests/job-cache/basic-ttl/test.wake b/tests/job-cache/basic-ttl/test.wake deleted file mode 100644 index 76f85631a..000000000 --- a/tests/job-cache/basic-ttl/test.wake +++ /dev/null @@ -1,11 +0,0 @@ -from wake import _ - -export def test (lst: List String): Result (List String) Error = - require Some x = head lst - else failWithError "must provide at least one argument" - - require Pass outputs = - makePlan "basic_test" Nil "echo {x}: deadbeefdeadbeef > {x}.txt" - | runJobWith defaultRunner - | getJobOutputs - Pass (map (_.getPathName) outputs)