diff options
author | Dave Borowitz <dborowitz@google.com> | 2012-06-27 13:55:25 -0700 |
---|---|---|
committer | Dave Borowitz <dborowitz@google.com> | 2012-06-27 13:55:25 -0700 |
commit | dc23a7cc421f09da42192c54ea8d54fb2ca30dfb (patch) | |
tree | cdb2505ff39eedccc973d39fb2b662d2a5ce5429 /org.eclipse.jgit.http.test/tst/org | |
parent | 2d1124b89bbe739cf828c57a104a7b48e26c5db9 (diff) | |
download | jgit-dc23a7cc421f09da42192c54ea8d54fb2ca30dfb.tar.gz jgit-dc23a7cc421f09da42192c54ea8d54fb2ca30dfb.zip |
Make InMemoryRepository pack names globally unique
It was easy to create multiple packs with exactly the same name and
same DfsRepositoryDescription in a test, which can poison the
DfsBlockCache. The javadoc for DfsObjDatabase.newPack() explicitly
says pack names should be unique within an entire DFS, so do this by
making the packId AtomicInteger static.
Arguably, test writers shouldn't be doing things like putting
'new DfsRepositoryDescription("test")' in a setUp() method, but that's
a natural thing to do, and we don't document this restriction
anywhere.
Change-Id: I9477413ab3950d83b7d17e173fbc0a3e064896e3
Diffstat (limited to 'org.eclipse.jgit.http.test/tst/org')
0 files changed, 0 insertions, 0 deletions