Skip to content

Poll refactoring with unit tests (PSF-1020) #6074

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
May 19, 2022

Conversation

onurays
Copy link
Contributor

@onurays onurays commented May 17, 2022

Aggregating poll editing, poll response and poll end events were handled in EventRelationsAggregationProcessor class which was over crowded. Furthermore it wasn't easy to write unit test for this class.

Within this PR, poll implementation moved to a separate class and unit tests are written.

Test coverage:

Method Line
100% (8/8) 75.5% (77/102)

@github-actions
Copy link

github-actions bot commented May 17, 2022

Unit Test Results

124 files  +  2  124 suites  +2   2m 20s ⏱️ +19s
217 tests +12  217 ✔️ +12  0 💤 ±0  0 ±0 
714 runs  +24  714 ✔️ +24  0 💤 ±0  0 ±0 

Results for commit 9adbeb8. ± Comparison against base commit a30912f.

♻️ This comment has been updated with latest results.

@onurays onurays requested review from a team, Claire1817 and ericdecanini and removed request for a team May 17, 2022 12:45
@onurays onurays requested a review from ericdecanini May 18, 2022 10:39
@onurays onurays changed the title Poll refactoring with unit tests Poll refactoring with unit tests (PSF-1020) May 19, 2022
Copy link
Contributor

@ericdecanini ericdecanini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ty for the changes! Just conflicts to resolve

onurays added 2 commits May 19, 2022 13:39
* develop: (251 commits)
  Space explore rooms screen alignment with design in figma (#5834)
  leaving space aligned with ios (#5942)
  Fix usage of System.currentTimeMillis(). This a bit mocky but anyway it's better to use SystemClock.elapsedRealtime() for this case.
  Update TimelinePreviousLastForwardTest.kt
  Changelog.d
  Rename 'getDomain' to 'getServerName'.
  Well-known lookups should not include the port of a server.
  Ah it was used in Gplay variant. Anyway I think we can still remove this now.
  Fix parsing of location data in non encrypted room
  Additionally increment for TimelinePreviousLastForwardTest
  Notify other devices of acceptance of verification request
  Instead of using a magic number, explicitly test for the events we expect.
  Adding comments on some strings and removing non necessary plural
  Remove ShortcutBadger lib and usage (it was dead code)
  Version++
  Fastlane file
  Towncrier
  Add `.login` to get the username of the PR merger.
  Rename folder for the PlayStore
  Remove empty translations
  ...

# Conflicts:
#	matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/SessionModule.kt
@onurays onurays merged commit da764d7 into develop May 19, 2022
@onurays onurays deleted the feature/ons/poll_refactoring branch May 19, 2022 11:53
@github-actions
Copy link

Matrix SDK

Integration Tests Results:

  • [org.matrix.android.sdk.session]
    = passed=20 failures=0 errors=0 skipped=3
  • [org.matrix.android.sdk.account]
    = passed=3 failures=0 errors=0 skipped=2
  • [org.matrix.android.sdk.internal]
    = passed=9 failures=1 errors=0 skipped=0
  • [org.matrix.android.sdk.ordering]
    = passed=16 failures=0 errors=0 skipped=0
  • [org.matrix.android.sdk.PermalinkParserTest]
    = passed=2 failures=0 errors=0 skipped=0

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.

2 participants