As for this week, the problem of the web application factory running the dependency injection during testing was managed to be solve with the help of Mr. Peter. Now the services registered in the dependency injection will no longer be instantiate twice during testing.
Next, after changing the stock take background service to using channel instead of concurrent dictionary. I ran into some problem where the channel is not being dequeue after an item is being queued to the channel. With some help from Mr.Peter, I’m manage to figured the problem was the instantiation of the channel.
The problem was that I instantiate a new channel in the accept command service class hence the item is never dequeue from the channel. Lastly, I refactor the cancel ongoing accept stock take command so that it will work with the current implementation of the background service. Now, I have make so that the channel can take multiple entries and the user will be able to cancel the ongoing accept stock take that they requested.
