Skip to content

Applications is unresponsive if request timeout fails #26

Closed
@bhermann

Description

@bhermann

Describe the bug
When the request to the web server takes too long, the CLI just dumps the Future Timeout Exception and does not get shut down properly.

Exception in thread "main" java.util.concurrent.TimeoutException: Futures timed out after [10 seconds]
	at scala.concurrent.impl.Promise$DefaultPromise.ready(Promise.scala:255)
	at scala.concurrent.impl.Promise$DefaultPromise.result(Promise.scala:259)
	at scala.concurrent.Await$.$anonfun$result$1(package.scala:215)
	at scala.concurrent.BlockContext$DefaultBlockContext$.blockOn(BlockContext.scala:53)
	at scala.concurrent.Await$.result(package.scala:142)
	at de.upb.cs.swt.delphi.cli.commands.SearchCommand$.execute(SearchCommand.scala:61)
	at de.upb.cs.swt.delphi.cli.DelphiCLI$.delayedEndpoint$de$upb$cs$swt$delphi$cli$DelphiCLI$1(DelphiCLI.scala:78)
	at de.upb.cs.swt.delphi.cli.DelphiCLI$delayedInit$body.apply(DelphiCLI.scala:31)
	at scala.Function0.apply$mcV$sp(Function0.scala:34)
	at scala.Function0.apply$mcV$sp$(Function0.scala:34)
	at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
	at scala.App.$anonfun$main$1$adapted(App.scala:76)
	at scala.collection.immutable.List.foreach(List.scala:389)
	at scala.App.main(App.scala:76)
	at scala.App.main$(App.scala:74)
	at de.upb.cs.swt.delphi.cli.DelphiCLI$.main(DelphiCLI.scala:31)
	at de.upb.cs.swt.delphi.cli.DelphiCLI.main(DelphiCLI.scala)

To Reproduce
Steps to reproduce the behavior:

  1. Produce a query that takes over 10s (e.g. setting limit to 10000)
  2. Observe

Expected behavior
A nice error message should be given and the client should be terminated.

Screenshots
n/a

Affected components (if known)
cli

Desktop (please complete the following information, if relevant):
n/a

Smartphone (please complete the following information, if relevant):
n/a

Additional context
n/a

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions