Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Document thermos checkpoint files, include them in git archives.
Bugs closed: AURORA-711

Reviewed at https://reviews.apache.org/r/27357/
  • Loading branch information
wfarner committed Oct 31, 2014
1 parent 349a76d commit 02a1c040e42e4b059f621afe3339f64d5649d390
Show file tree
Hide file tree
Showing 45 changed files with 27 additions and 2 deletions.
@@ -1,6 +1,5 @@
/gradlew export-ignore
/gradle export-ignore
/src/resources export-ignore

*.pyc export-ignore
*.zip export-ignore
@@ -0,0 +1,25 @@
# Generating test resources

## Background
The Aurora source repository and distributions contain several
[binary files](../src/test/resources/org/apache/thermos/root/checkpoints) to
qualify the backwards-compatibility of thermos with checkpoint data. Since
thermos persists state to disk, to be read by other components (the GC executor
and the thermos observer), it is important that we have tests that prevent
regressions affecting the ability to parse previously-written data.

## Generating test files
The files included represent persisted checkpoints that exercise different
features of thermos. The existing files should not be modified unless
we are accepting backwards incompatibility, such as with a major release.

It is not practical to write source code to generate these files on the fly,
as source would be vulnerable to drift (e.g. due to refactoring) in ways
that would undermine the goal of ensuring backwards compatibility.

The most common reason to add a new checkpoint file would be to provide
coverage for new thermos features that alter the data format. This is
accomplished by writing and running a
[job configuration](configuration-reference.md) that exercises the feature, and
copying the checkpoint file from the sandbox directory, by default this is
`/var/run/thermos/checkpoints/<aurora task id>`.
@@ -77,7 +77,7 @@ def setup_tree(td, lose=False):
safe_rmtree(td)

# TODO(wickman) These should be referred as resources= in the python_target instead.
shutil.copytree('src/resources/org/apache/thermos/root', td)
shutil.copytree('src/test/resources/org/apache/thermos/root', td)

if lose:
lost_age = time.time() - (
@@ -0,0 +1 @@
For details on these files, see docs/test-resource-generation.md.

0 comments on commit 02a1c04

Please sign in to comment.