in interactive mode, copy the context on client.connect(...)
adapt the test case for interactive mode