From f472484acd97bc70e4ba8cac40867a00e8f6cd85 Mon Sep 17 00:00:00 2001 From: Michael Schmoock Date: Mon, 21 Feb 2022 10:06:24 +0100 Subject: [PATCH] noise: adds xfail testcase for #331 --- noise/test_chat.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/noise/test_chat.py b/noise/test_chat.py index ebe23ba..8be9572 100644 --- a/noise/test_chat.py +++ b/noise/test_chat.py @@ -9,6 +9,7 @@ import os import pytest import unittest import zbase32 +import concurrent plugin = os.path.join(os.path.dirname(__file__), 'noise.py') @@ -142,6 +143,20 @@ def test_forward_ok(node_factory, executor): assert(m2['verified'] is True) +@pytest.mark.xfail(raises=concurrent.futures._base.TimeoutError) +def test_read_tip(node_factory, executor): + """Testcase for issue #331 https://github.com/lightningd/plugins/issues/331 + + We try to read the topmost message by its ID. + """ + opts = [{'plugin': plugin}] * 3 + l1, l2, l3 = node_factory.line_graph(3, wait_for_announce=True, opts=opts) + + l1.rpc.sendmsg(l3.info['id'], "test 1") + msg = executor.submit(l3.rpc.recvmsg, 0).result(10) + assert msg.get('body') == "test 1" + + def test_missing_tlv_fields(node_factory): """If we're missing a field we should not crash """