Skip to content

Commit

Permalink
Merge pull request #19 from FalloutFalcon/ci-improvments
Browse files Browse the repository at this point in the history
  • Loading branch information
FalloutFalcon authored Oct 8, 2024
2 parents e9a5eff + 147f175 commit d8c5ff6
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions code/modules/unit_tests/create_and_destroy.dm
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,12 @@

// Drastically lower the amount of time it takes to GC, since we don't have clients that can hold it up.
SSgarbage.collection_timeout[GC_QUEUE_CHECK] = 10 SECONDS
//Prevent the garbage subsystem from harddeling anything, if only to save time
SSgarbage.collection_timeout[GC_QUEUE_HARDDELETE] = 10000 HOURS
//Clear it, just in case
cached_contents.Cut()

var/list/queues_we_care_about = list()
// All up to harddel
for(var/i in 1 to GC_QUEUE_HARDDELETE - 1)
// All of em, I want hard deletes too, since we rely on the debug info from them
for(var/i in 1 to GC_QUEUE_HARDDELETE)
queues_we_care_about += i

//Now that we've qdel'd everything, let's sleep until the gc has processed all the shit we care about
Expand All @@ -160,6 +158,7 @@
time_needed += SSgarbage.collection_timeout[index]

var/start_time = world.time
var/real_start_time = REALTIMEOFDAY
var/garbage_queue_processed = FALSE

sleep(time_needed)
Expand All @@ -181,7 +180,7 @@
garbage_queue_processed = TRUE
break

if(world.time > start_time + time_needed + 30 MINUTES) //If this gets us gitbanned I'm going to laugh so hard
if(REALTIMEOFDAY > real_start_time + time_needed + 30 MINUTES) //If this gets us gitbanned I'm going to laugh so hard
TEST_FAIL("Something has gone horribly wrong, the garbage queue has been processing for well over 30 minutes. What the hell did you do")
break

Expand Down Expand Up @@ -214,4 +213,3 @@
SSticker.delay_end = FALSE
//This shouldn't be needed, but let's be polite
SSgarbage.collection_timeout[GC_QUEUE_CHECK] = GC_CHECK_QUEUE
SSgarbage.collection_timeout[GC_QUEUE_HARDDELETE] = GC_DEL_QUEUE

0 comments on commit d8c5ff6

Please sign in to comment.