Skip to content

Refactor the ActiveAck implemenation to simplify testing#4658

Merged
rabbah merged 3 commits intoapache:masterfrom
chetanmeh:invoker-activeack
Oct 3, 2019
Merged

Refactor the ActiveAck implemenation to simplify testing#4658
rabbah merged 3 commits intoapache:masterfrom
chetanmeh:invoker-activeack

Conversation

@chetanmeh
Copy link
Member

This is based on discussion in #4641 and to simplify adding test for changes to be introduced in #4632

Description

This PR refactors out the logic related to active in a separate class which enables implementing unit test for the same. This also abstracts out the user event flow such that it can be tested independently of its default configuration

There is no functional change in this PR

Related issue and scope

  • I opened an issue to propose and discuss this change (#????)

My changes affect the following components

  • API
  • Controller
  • Message Bus (e.g., Kafka)
  • Loadbalancer
  • Invoker
  • Intrinsic actions (e.g., sequences, conductors)
  • Data stores (e.g., CouchDB)
  • Tests
  • Deployment
  • CLI
  • General tooling
  • Documentation

Types of changes

  • Bug fix (generally a non-breaking change which closes an issue).
  • Enhancement or new feature (adds new functionality).
  • Breaking change (a bug fix or enhancement which changes existing behavior).

Checklist:

  • I signed an Apache CLA.
  • I reviewed the style guides and followed the recommendations (Travis CI will check :).
  • I added tests to cover my changes.
  • My changes require further changes to the documentation.
  • I updated the documentation where necessary.

@codecov-io
Copy link

Codecov Report

Merging #4658 into master will decrease coverage by 4.7%.
The diff coverage is 60%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4658      +/-   ##
==========================================
- Coverage   83.12%   78.41%   -4.71%     
==========================================
  Files         184      185       +1     
  Lines        8438     8442       +4     
  Branches      591      593       +2     
==========================================
- Hits         7014     6620     -394     
- Misses       1424     1822     +398
Impacted Files Coverage Δ
...pache/openwhisk/core/invoker/InvokerReactive.scala 79.46% <100%> (+21.61%) ⬆️
...he/openwhisk/core/invoker/MessagingActiveAck.scala 53.84% <53.84%> (ø)
...core/database/cosmosdb/RxObservableImplicits.scala 0% <0%> (-100%) ⬇️
...ore/database/cosmosdb/cache/CacheInvalidator.scala 0% <0%> (-100%) ⬇️
...core/database/cosmosdb/CosmosDBArtifactStore.scala 0% <0%> (-96.17%) ⬇️
...tabase/cosmosdb/cache/CacheInvalidatorConfig.scala 0% <0%> (-94.74%) ⬇️
...sk/core/database/cosmosdb/CosmosDBViewMapper.scala 0% <0%> (-92.6%) ⬇️
...e/database/cosmosdb/cache/ChangeFeedListener.scala 0% <0%> (-86.67%) ⬇️
...e/database/cosmosdb/cache/KafkaEventProducer.scala 0% <0%> (-76.48%) ⬇️
...whisk/core/database/cosmosdb/CosmosDBSupport.scala 0% <0%> (-74.08%) ⬇️
... and 32 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3f9a780...0b0f874. Read the comment docs.

@rabbah rabbah merged commit cd7a639 into apache:master Oct 3, 2019
BillZong pushed a commit to BillZong/openwhisk that referenced this pull request Nov 18, 2019
@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 60.00000% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.41%. Comparing base (3f9a780) to head (0b0f874).
⚠️ Report is 489 commits behind head on master.

Files with missing lines Patch % Lines
...he/openwhisk/core/invoker/MessagingActiveAck.scala 53.84% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4658      +/-   ##
==========================================
- Coverage   83.12%   78.41%   -4.71%     
==========================================
  Files         184      185       +1     
  Lines        8438     8442       +4     
  Branches      591      593       +2     
==========================================
- Hits         7014     6620     -394     
- Misses       1424     1822     +398     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants