• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

contiv / vpp / 966
66%

Build:
DEFAULT BRANCH: master
Ran 06 Feb 2018 07:27PM UTC
Jobs 1
Files 28
Run time 33min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
966

push

travis-ci

tiewei
Add unit tests for handling of transient Etcd errors (#572)

This pull request add unit tests for testing the handling of transient Etcd errors. The unit tests have been added to the policy_reflector_test, which contains data store resync tests for the whole KSR.

New tests:

testResyncPolicyTransientDsError: is called from the main test function that initializes the Policy reflector. The test first initializes test data in the data store, and get a snapshot of Policy Reflector's stats. Then, Etcd is checked a couple of times (checkEtcdTransientError) to properly initialize etcdMonitor. Finally, a transient data store error is emulated by clearing the data store and etcd is check again (checkEtcdTransientError), which should cause a data store resync. The test then checks that the data store resync has been properly executed.
Modified tests:

testResyncPolicyDataStoreDownThenAdd: uses the etcd monitor instead of KSR event functions to generate data store up/down events. This way, this test also covers a couple of paths in etcdMonitor.processEtcdMonitorEvent
Minor cleanup:

in all tests, ***Writers have been renamed to ***Brokers
minor naming cleanups
typo fixes
The mockKeyProtoValBroker's GetValue function has been modified to more closely mimic the real Etcd Broker's GetValue function because the GetValue function is used in the transient error detection mechanism. This change means that if a value for a given key is not found, the function now returns found=false and error=nil (not finding a value for a key is not an error condition). All tests using mockKeyProtoValBroker's had to be modified to work with the new logic.

4286 of 5570 relevant lines covered (76.95%)

35.79 hits per line

Jobs
ID Job ID Ran Files Coverage
1 966.1 (GO_BUILD_TAGS=mockvpp) 06 Feb 2018 07:27PM UTC 0
76.95
Travis Job 966.1
Source Files on build 966
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #966
  • ba3a9285 on github
  • Prev Build on master (#965)
  • Next Build on master (#967)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc