EnvisEdge icon indicating copy to clipboard operation
EnvisEdge copied to clipboard

🚨 Tests: Restructure and Add new FLSystemManager Tests

Open ayush268 opened this issue 3 years ago • 0 comments

🛩 Where?

Code Location: https://github.com/NimbleEdge/RecoEdge/blob/75c397a4d911cbea04f2c2913a95ccc8642d5bb6/scala_core/src/test/scala/org/nimbleedge/recoedge/FLSystemManagerSpec.scala#L40

The Actor + Functionality to be tested: https://github.com/NimbleEdge/RecoEdge/blob/75c397a4d911cbea04f2c2913a95ccc8642d5bb6/scala_core/src/main/scala/org/nimbleedge/recoedge/FLSystemManager.scala

💭 Description

The FLSystemManager is the top level Actor for the FLSystem.

Under FLSystem, lies the entire FL System, mainly the following major actors (entities):

  • Orchestrator (root nodes) - It will have aggregators as children.
  • Aggregator (intermediate nodes) - An aggregator can have other aggregators and trainers as children.
  • Trainer (leaves) - A trainer is at the leaf of the tree. (Other actors might be spawned as need arises).

We are using the ScalaTest library for testing: https://www.scalatest.org/user_guide

We are using the ScalaTestWithActorTestKit akka library for testing Actors: https://developer.lightbend.com/guides/akka-quickstart-scala/testing-actors.html

You can check out the following pre-written tests as a reference to understand as well:

  • https://github.com/NimbleEdge/RecoEdge/blob/75c397a4d911cbea04f2c2913a95ccc8642d5bb6/scala_core/src/test/scala/org/nimbleedge/recoedge/FLSystemManagerSpec.scala#L40
  • https://github.com/NimbleEdge/RecoEdge/blob/75c397a4d911cbea04f2c2913a95ccc8642d5bb6/scala_core/src/test/scala/org/nimbleedge/recoedge/models/IdentifierSpec.scala#L61
  • https://github.com/NimbleEdge/RecoEdge/blob/75c397a4d911cbea04f2c2913a95ccc8642d5bb6/scala_core/src/test/scala/org/nimbleedge/recoedge/models/IdentifierSpec.scala#L94

Type of Test

Unit test

👀 Have you spent some time to check if this issue has been raised before?

  • [X] I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

  • [X] I read the Code of Conduct

ayush268 avatar Jan 20 '22 17:01 ayush268