david-streamlio opened a new issue #6932:
URL: https://github.com/apache/pulsar/issues/6932
**Describe the bug**
When attempting to start a LocalRunner that connects to stream storage, the
instance will hang if the streamServiceUrl is incorrect or the service is
unresponsive.
**To Reproduce**
Steps to reproduce the behavior:
1. Create an instance of the LocalRunner class inside a Java class
2. Initialize it like so:
` LocalRunner localRunner =
LocalRunner.builder()
.brokerServiceUrl(BROKER_URL)
.stateStorageServiceUrl("bk://localhost:4181")
.functionConfig(functionConfig)
.build(); localRunner.start(true);`
3. Attach to the process with a debugger and set a breakpoint at line 342 of
the JavaInstanceRunnable class and attempt to step through to line 343
`result(storageAdminClient.getStream(tableNs, tableName));
return;`
4. Notice that the process never returns, and the test will "hang"
indefinitely
**Expected behavior**
I would expect the process to return and notify the user of the underlying
issue that is preventing the LocalRunner from communicating with the StateStore.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- OS: [e.g. iOS]
**Additional context**
It appears that there original author intended for the above call to timeout
after one minute, because they wrap the above call in a while loop that uses an
StopWatch. However, if the call to the `storageAdminClient.getStream(tableNs,
tableName)` call hangs indefinitely, then the 1 minute pause is exceeded. In my
experience it was indefinite.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]