You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A system test instance is currently paused by default, so the scheduled rules never invoke garbage collection. We invoke it explicitly, but this happens for the whole instance.
Description
Instead of explicitly invoking garbage collection in system tests, we'd like to enable it by default. When we wait for garbage collection in tests, we can wait for the scheduled rule to run.
This should be more representative of how the system works in reality, and it should make the tests easier to parallelise.
Analysis
We can ensure that the schedule rule for garbage collection is enabled when we connect to an instance in DeployedSleeperInstances.createInstanceIfMissing. We can avoid ever pausing the schedule rule for GC in any tests.
There is currently code for working with schedule rules in SnapshotsDriver. We could move that to a separate driver for schedule rules. Note that the code to disable the snapshot rule there is not currently used, so it could be deleted.
Note that all instances are deployed paused in AwsSleeperInstanceDriver.deployInstanceIfNotPresent.
We can remove SystemTestGarbageCollection.invoke, GarbageCollectionDriver and all driver implementations. We may need to adjust the amount of time that tests wait for GC to be applied. We'll need to increase the frequency of GC (sleeper.gc.period.minutes) and lower the delay before deletion (sleeper.default.gc.delay.minutes), both defined in GarbageCollectionProperty. We can set those in SystemTestInstance.createInstanceProperties.
If we still need to invoke garbage collection explicitly in any tests, we can do it just for the tables in that test. We'd like to avoid this if possible.
The text was updated successfully, but these errors were encountered:
Background
Split from:
A system test instance is currently paused by default, so the scheduled rules never invoke garbage collection. We invoke it explicitly, but this happens for the whole instance.
Description
Instead of explicitly invoking garbage collection in system tests, we'd like to enable it by default. When we wait for garbage collection in tests, we can wait for the scheduled rule to run.
This should be more representative of how the system works in reality, and it should make the tests easier to parallelise.
Analysis
We can ensure that the schedule rule for garbage collection is enabled when we connect to an instance in
DeployedSleeperInstances.createInstanceIfMissing
. We can avoid ever pausing the schedule rule for GC in any tests.There is currently code for working with schedule rules in
SnapshotsDriver
. We could move that to a separate driver for schedule rules. Note that the code to disable the snapshot rule there is not currently used, so it could be deleted.Note that all instances are deployed paused in
AwsSleeperInstanceDriver.deployInstanceIfNotPresent
.We can remove
SystemTestGarbageCollection.invoke
,GarbageCollectionDriver
and all driver implementations. We may need to adjust the amount of time that tests wait for GC to be applied. We'll need to increase the frequency of GC (sleeper.gc.period.minutes
) and lower the delay before deletion (sleeper.default.gc.delay.minutes
), both defined inGarbageCollectionProperty
. We can set those inSystemTestInstance.createInstanceProperties
.If we still need to invoke garbage collection explicitly in any tests, we can do it just for the tables in that test. We'd like to avoid this if possible.
The text was updated successfully, but these errors were encountered: