[PATCH] D79302: [clangd] Propogate context in LSPServer tests

Kadir Çetinkaya via cfe-commits cfe-commits at lists.llvm.org
Sun May 3 11:39:44 PDT 2020


i was trying to provide a more generic "callback" mechanism, but you are
right, it is not needed for this test.

going to keep context prop logic though, as it might be necessary later on.
SG?

On Sun, May 3, 2020 at 9:09 PM Sam McCall via Phabricator <
reviews at reviews.llvm.org> wrote:

> sammccall added inline comments.
>
>
> ================
> Comment at: clang-tools-extra/clangd/unittests/ClangdLSPServerTests.cpp:164
> +    WithContextValue Ctx(
> +        llvm::make_scope_exit([&CallFinished] { CallFinished.notify();
> }));
> +    llvm::consumeError(Client.call(MethodName, {}).take().takeError());
> ----------------
> Sorry, I didn't really put all the pieces together in my head the first
> time around.
> The context propagation seems OK, but it's too fiddly as a way to control
> sequencing - can't you just call Client.sync() and assert after that?
>
>
> Repository:
>   rG LLVM Github Monorepo
>
> CHANGES SINCE LAST ACTION
>   https://reviews.llvm.org/D79302/new/
>
> https://reviews.llvm.org/D79302
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200503/dc6122c7/attachment.html>


More information about the cfe-commits mailing list