Skip to content

A flaky Downtime unit test in GitHub Action #2309

@h2zh

Description

@h2zh

Pelican Version:
v7.16.1

Pelican Service:

  • Client
  • Plugin
  • Registry
  • Director
  • Origin
  • Cache
  • Other (Unit Test)

Describe the bug
In GitHub Action, "future-to-active-toggle" becomes a flaky (or always failing) test. This is because the existing downtime window (+/-1s) is way too tight. By the time this downtime reaches the Director, more than 1 second may have elapsed, so this “active” Downtime has already expired.

--- FAIL: TestDirectorRegistration (2.52s)
    --- FAIL: TestDirectorRegistration/cache-downtime-filtering (1.07s)
        --- FAIL: TestDirectorRegistration/cache-downtime-filtering/future-to-active-toggle (0.01s)
            director_test.go:1286: 
                	Error Trace:	/Users/runner/work/pelican/pelican/director/director_test.go:1286
                	Error:      	Should be true
                	Test:       	TestDirectorRegistration/cache-downtime-filtering/future-to-active-toggle
                	Messages:   	filter added on active downtime
            director_test.go:1287: 
                	Error Trace:	/Users/runner/work/pelican/pelican/director/director_test.go:1287
                	Error:      	Not equal: 
                	            	expected: "serverFiltered"
                	            	actual  : ""
                	            	
                	            	Diff:
                	            	--- Expected
                	            	+++ Actual
                	            	@@ -1,2 +1,2 @@
                	            	-(director.filterType) (len=14) "serverFiltered"
                	            	+(director.filterType) ""
                	            	 
                	Test:       	TestDirectorRegistration/cache-downtime-filtering/future-to-active-toggle

To Reproduce
Check out the test run history.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions