This removes all .bazel and .bzl files, and a bunch of scripts relating
to bazel, now that it's been entirely replaced.
There are still a few places where traces could be removed, but this
removes the brunt of the bazel stuff that remains.
Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
This test can easily fail on a heavily loaded machine, such as one
running many tests in parallel.
1. The afterFunc could be delayed _massively_ on a heavily loaded
machine, such as one running a lot of tests in parallel.
2. Requiring an accuracy of 1ms seems like a flake waiting to happen
(as it was in this case)
3. When we write code which uses this scheduler, we can't even
safely assume the afterFunc will _ever_ be run, let alone run
within a 1% margin of time error. As such I don't think this
test is providing any value beyond a general sanity check.
By increasing the allowable delta massively, we keep this test as a
sanity check but basically remove the chance of a flake. The test
essentially becomes "does afterFunc work, generally?".
Also adds a check that the elapsed time is greater than the expected
time.
Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
This reverts commit 641960b6. The reason we decided to revert this is
that we are unsure about the implications of adding the
scheduledWorkQueue.Forget call. The new Forget call is left untested,
and it makes us nervous not to know exactly if it works as intended.
The "Forget" memory leak that we are reverting now is the cause of a
tiny fraction of the overall memory leakage that was fixed in the PR
in the scheduler itself. Reverting this means that some goroutines will
be leaked, but only when a Certificate gets removed and never recreated
with the same name.
Signed-off-by: Maël Valais <mael@vls.dev>
While unlikely, it was possible before for the scheduler to race in such
a way that concurrent 'Add' calls would result in "leaking" a timer,
thus making an unstoppable invocation of that event.
This includes a test which fails without the small bugfix in
scheduler.go