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
In integration tests, brokers and servers run in the same JVM. All of them share the same ThreadUsageResourceAccountant in a singleton in Tracing.java. This makes certain kinds of tests hard to write. For example:
Tests that involve relevant operations in a specific server.
Some tests use InterruptingAccountant. This class is useful to inject errors in the broker. However, it is not possible to inject errors in servers as the broker will error out first.
Couple of options are:
Run a server in a different JVM. This is a major change in how tests have to be written. It will also make debug mode harder.
Use dependency injection rather than a singleton to pass around an accountant object.
The text was updated successfully, but these errors were encountered:
In integration tests, brokers and servers run in the same JVM. All of them share the same
ThreadUsageResourceAccountant
in a singleton inTracing.java
. This makes certain kinds of tests hard to write. For example:Some tests use
InterruptingAccountant
. This class is useful to inject errors in the broker. However, it is not possible to inject errors in servers as the broker will error out first.Couple of options are:
The text was updated successfully, but these errors were encountered: