JetBrains / teamcity-bazel-plugin

TeamCity plugin for Bazel build system
Apache License 2.0
14 stars 6 forks source link

Unit tests for `bazel.messages.HierarchyImpl` #41

Closed odisseus closed 5 months ago

odisseus commented 6 months ago

I have created some unit tests to showcase the current behaviour of bazel.messages.HierarchyImpl. However, I am not sure whether this behaviour is correct, especially regarding the invocation of actions associated with each node.

@NikolayPianikov, @vmayushan — can you please take a look and verify that this is the intended behaviour? Are there any other cases worth covering with tests?

vmayushan commented 5 months ago

Hi! For me tests are fully consistent with implementation.

At the same time I had few questions about implementation (not tests). For example: why don't we call dispose action for the singleton node without children, but only if we close node with children.

I checked where do we use "dispose action "and the only place is BuildStartedHandler.kt, we use it to close build log block. I think we could refactor logic of HierarchyImpl itself, just to call dispose all the time. I guess not in scope of this task.

Thank you for the PR.