swim
swim copied to clipboard
Fixes stackoverflow in client. Refactors client interface to hide private API.
@SirCipher The change looks good. Do we have a test case that failed which got fixed due to this commit? If not, is there a way to reproduce the stackoverlow error?
@SirCipher The change looks good. Do we have a test case that failed which got fixed due to this commit? If not, is there a way to reproduce the stackoverlow error?
@ajay-gov The stack overflow was swallowed and I only noticed it when debugging - opening a downlink and having breakpoint on the ClientRuntime::reportDown
method. If you want to reproduce it, you'd need to change SwimClientRef::reportDown
to report the metric: this.edge.reportDown(metric)
and have a breakpoint there when opening a downlink.
@SirCipher I see, thanks.
So the ClientRuntime.fail(message)
gets invoked but it's not doing anything with it. Should we enhance the ClientRuntimeSpec
to use an extended version of the ClienRuntime
and override the didFail
method. Something like this:
class TestClientRuntime extends ClientRuntime {
@Override
public void fail(Object message) {
failure = message;
}
And then do the following assertion assertNull(failure, failure.toString());
after didSync.await();
That way we will have a failed test case that captures this issue?
Will be addressed in swim5