You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reason this is an interface is so that we can have one official production implementation (which is VmFactoryImplementation - perhaps better naming is needed to get these more in sync) and still have the ability to create mock VirtualMachineManager instances for unit (and even integ) tests to contrive certain behaviours.
Currently VirtualMachineManager depends on VM, which is defined in its child. Actually VM should probably just be moved out of the child, since even mocked implementations will require this same VM behaviour.
There is a third class, VirtualMachineProvider, which acts as an arbitrary provider of VirtualMachineManager implementations. By default, the production VmFactoryImplementation is used, but there is an ability to set this manager so that tests can inject a mocked implementation into the BulkExecution via this path.
VirtualMachineProvider is what's used by the BulkExecutor to grab a virtual machine, and this is also the class that Aion uses at bootup to initialize and shutdown the virtual machines.
Aside from moving VM into its own class and some re-naming, we probably also want to ensure that this model makes sense.. there may be a much cleaner way of being able to inject mocked & production implementations into the bulk executor.
The text was updated successfully, but these errors were encountered:
The reason this is an interface is so that we can have one official production implementation (which is
VmFactoryImplementation
- perhaps better naming is needed to get these more in sync) and still have the ability to create mockVirtualMachineManager
instances for unit (and even integ) tests to contrive certain behaviours.Currently
VirtualMachineManager
depends onVM
, which is defined in its child. ActuallyVM
should probably just be moved out of the child, since even mocked implementations will require this sameVM
behaviour.There is a third class,
VirtualMachineProvider
, which acts as an arbitrary provider ofVirtualMachineManager
implementations. By default, the productionVmFactoryImplementation
is used, but there is an ability to set this manager so that tests can inject a mocked implementation into theBulkExecution
via this path.VirtualMachineProvider
is what's used by theBulkExecutor
to grab a virtual machine, and this is also the class thatAion
uses at bootup to initialize and shutdown the virtual machines.Aside from moving
VM
into its own class and some re-naming, we probably also want to ensure that this model makes sense.. there may be a much cleaner way of being able to inject mocked & production implementations into the bulk executor.The text was updated successfully, but these errors were encountered: