Skip to content

Validate GiraphExecutor mock in Giraph PageRank test#746

Open
dileepapeiris wants to merge 1 commit intoapache:mainfrom
dileepapeiris:wayang-api-sql/fix--GiraphExecutor-issue
Open

Validate GiraphExecutor mock in Giraph PageRank test#746
dileepapeiris wants to merge 1 commit intoapache:mainfrom
dileepapeiris:wayang-api-sql/fix--GiraphExecutor-issue

Conversation

@dileepapeiris
Copy link
Copy Markdown

@dileepapeiris dileepapeiris commented Apr 14, 2026

Summary

  • Resolve issue Validate the mock of GiraphExecutor #581 by validating the GiraphExecutor mock contract in GiraphPagaRankOperatorTest.
  • Remove @Disabled and replace the TODO path with deterministic assertions.
  • Ensure giraphExecutor.getGiraphConfiguration() is both stubbed and verified during operator execution.

Details

  • Updated setUp to return a concrete GiraphConfiguration from the mocked executor.
  • Added assertThrows(KeyValueProvider.NoSuchKeyException.class, ...) around execution to validate the early configuration path without depending on full Giraph runtime success.
  • Added Mockito verification to confirm the operator uses the mocked GiraphExecutor.

Validation

  • Ran:
    • ./mvnw -pl wayang-platforms/wayang-giraph -Dtest=GiraphPagaRankOperatorTest test
  • Result:
    image

Re-enable the Giraph PageRank unit test by removing the @Disabled/TODO and add stronger validations. Mock giraphExecutor.getGiraphConfiguration() in setUp, expect KeyValueProvider.NoSuchKeyException from execute via assertThrows, and verify that getGiraphConfiguration() was called. Also add necessary imports for GiraphConfiguration, KeyValueProvider, assertThrows and verify.
@dileepapeiris dileepapeiris marked this pull request as ready for review April 14, 2026 08:39
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.

1 participant