Skip to content

More test flake fixes #8472

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions common/status_levels.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ enum log_level {
};
#define LOG_LEVEL_MAX LOG_BROKEN

/* Things that can happen in real life, but we don't expect under CI. */
#define CI_UNEXPECTED "That's weird: "

const char *log_level_name(enum log_level level);
bool log_level_parse(const char *levelstr, size_t len,
enum log_level *level);
Expand Down
3 changes: 1 addition & 2 deletions connectd/multiplex.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,7 @@ static void maybe_free_peer(struct peer *peer)
* not reading, we have to give up. */
static void close_peer_io_timeout(struct peer *peer)
{
/* BROKEN means we'll trigger CI if we see it, though it's possible */
status_peer_broken(&peer->id, "Peer did not close, forcing close");
status_peer_unusual(&peer->id, CI_UNEXPECTED "Peer did not close, forcing close");
io_close(peer->to_peer);
}

Expand Down
2 changes: 1 addition & 1 deletion contrib/pyln-testing/pyln/testing/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ def checkBadGossip(node):

def checkBroken(node):
node.daemon.logs_catchup()
broken_lines = [l for l in node.daemon.logs if '**BROKEN**' in l]
broken_lines = [l for l in node.daemon.logs if '**BROKEN**' in l or "That's weird: " in l]
if node.broken_log:
ex = re.compile(node.broken_log)
broken_lines = [l for l in broken_lines if not ex.search(l)]
Expand Down
8 changes: 7 additions & 1 deletion tests/test_bookkeeper.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,8 +379,14 @@ def test_bookkeeping_missed_chans_leases(node_factory, bitcoind):
l1.wait_local_channel_active(scid)
channel_id = first_channel_id(l1, l2)

# Sigh. bookkeeper sorts events by timestamp. If the invoice event happens
# too close, it can change the order, so sleep here.
time.sleep(1)

# Send l2 funds via the channel
l1.pay(l2, invoice_msat)
l1.daemon.wait_for_log(r'coin movement:.*\'invoice\'')
# Make sure they're completely settled, so accounting correct.
wait_for(lambda: only_one(l1.rpc.listpeerchannels()['channels'])['htlcs'] == [])

# Now turn the bookkeeper on and restart
l1.stop()
Expand Down
Loading