v.io/x/ref/services/syncbase/vsync: fix flaky TestBlobFetchSimple

I had two errors in TestBlobFetchSimple.

First, it was flaky because I ran two test phases back to back using the same
set of 100 blob ids.  The code determines when the first phase is over
when its fake flob fetch routine decrements a test-local counter to zero.
But there can be a delay between that routine decrementing its counter,
and the routine returning to the blob fetching code, which then must record the
blob as having been fetched successfully.
If the second phase starts while there are still fetches that have completed,
but not yet been recorded, the blob fetcher's duplicate elimination
will come into play, and unexpectedly ignore some blob fetch requests from the
second phase.  This is now fixed by creating new blob ids for each phase.

Second, I was failing to shutdown the vsync test framework correctly.
I now call vsync.destroyService().

Change-Id: I91bde063391cbe3b93c3b041f19e0ea6bd4c59a0
1 file changed
tree: 0e0ec59a30ecb4d440e2cb08885a4cc4283ea195
  1. cmd/
  2. examples/
  3. internal/
  4. lib/
  5. runtime/
  6. services/
  7. test/
  8. .gitignore
  9. AUTHORS
  10. CONTRIBUTING.md
  11. CONTRIBUTORS
  12. envvar.go
  13. envvar_test.go
  14. LICENSE
  15. PATENTS
  16. README.md
  17. VERSION
README.md

Vanadium

This repository contains a reference implementation of the Vanadium APIs.

Unlike the APIs in https://github.com/vanadium/go.v23, which promises to provide backward compatibility this repository makes no such promises.