Skip to content
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

Refactor the StreamClassRepository class #27

Merged
merged 1 commit into from
Apr 9, 2024

Conversation

s-vitaliy
Copy link
Contributor

Part of #24

Scope

Implemented:

  • Refactored the StreamDefinitionRepository class to use asyncrchonious API
  • Fixed return type of the IStreamClassRepository.Get method

Additional changes:

  • Added the AsOptionalStreamDefinition extension method to avoid code duplication and unnecessary type casts

Checklist

  • GitHub issue exists for this change.
  • Unit tests added and they pass.
  • Line Coverage is at least 80%.
  • Review requested on latest commit.

@s-vitaliy s-vitaliy requested a review from a team as a code owner April 9, 2024 15:04
Copy link

github-actions bot commented Apr 9, 2024

Coverage after merging refactor-stream-definition-repository into main will be

53.33%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   ArcaneEnvironment.cs0%100%0%0%10, 5, 8–9
src/Extensions
   JsonElementExtensions.cs0%100%0%0%20
   V1JobExtensions.cs85.58%75%90.91%90.16%40, 40, 45, 61–62, 62, 62, 62, 62–65, 83, 83
src/Models/StreamClass
   V1Beta1StreamClassSpec.cs20%100%20%20%11, 17, 23, 29
src/Models/StreamClass/Base
   IStreamClass.cs0%100%0%0%44–49
src/Models/StreamDefinitions/Base
   IStreamDefinition.cs90%83.33%100%100%28
src/Models/StreamStatuses/StreamStatus/V1Beta1
   V1Beta1StreamStatus.cs100%100%100%100%
src/Services
   StreamInteractionService.cs0%100%0%0%16–19, 23–27, 31–35, 39–45
src/Services/Maintenance
   HostedStreamingJobMaintenanceService.cs0%0%0%0%16–24, 27–29, 29, 29–36, 39–42
   StreamingJobMaintenanceService.cs89.84%82.14%100%91.40%103–106, 121, 130–133, 135, 61, 66, 97
src/Services/Operator
   HostedStreamOperatorService.cs82.14%100%66.67%82.61%39–42
   StreamClassOperatorService.cs70.30%40%75%73.49%107–110, 116, 121–122, 127–130, 74, 74, 77, 79, 84–86, 86, 86–91, 97–99
   StreamOperatorService.cs93.47%87.04%100%95.65%105–111, 116, 124, 138, 138, 144, 166
   StreamOperatorServiceWorker.cs77.78%50%75%80%47–51, 56, 64
   StreamOperatorServiceWorkerFactory.cs100%100%100%100%
src/Services/Repositories
   StreamDefinitionRepository.cs0%0%0%0%100–111, 22–29, 32–34, 34, 34–49, 53–55, 55, 55–76, 79–81, 81, 81–93, 96–98, 98, 98–99
   StreamingJobTemplateRepository.cs0%0%0%0%20–27, 31–33, 33, 33, 33, 33, 33, 33, 33, 33–36, 39–47
src/Services/Streams
   StreamingJobOperatorService.cs0%0%0%0%100–107, 110–113, 113, 113–115, 118–121, 121, 121–123, 126–129, 129, 129–131, 134–137, 140–146, 150–152, 152, 152, 152, 152–155, 155, 155, 155, 155–156, 158–161, 163–169, 173, 173, 173, 173, 173–179, 182–188, 191–200, 31–43, 46, 49–56, 59–60, 60, 60–63, 63, 63–70, 70, 70–90, 90, 90, 90, 90–93, 93, 93–99

@s-vitaliy s-vitaliy merged commit f47c762 into main Apr 9, 2024
2 checks passed
@s-vitaliy s-vitaliy deleted the refactor-stream-definition-repository branch April 9, 2024 15:18
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