Skip to content

Commit

Permalink
ISSUE 3044: ETCD tests hang. Added global timeout, fork tests jvm, fi…
Browse files Browse the repository at this point in the history
…xed noop slf4j to see log in case of hang (#3051)

Descriptions of the changes in this PR:

### Motivation

ETCD test flake / hang occasionally causing CI job timeout.

### Changes

Added global timeout - kill test early if hanged
fork tests jvm - I think it helped locally (no repro) but possibly just reduced frequency of hangs 
fixed noop slf4j warning, also to see log in case of hang 

Master Issue: #3044
  • Loading branch information
dlg99 committed Feb 22, 2022
1 parent 894b32a commit 1cf282c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions metadata-drivers/etcd/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,6 @@ publishing {
}
}

test {
forkEvery = 1
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,18 @@
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Rule;
import org.junit.rules.Timeout;

/**
* A test base that setup etcd cluster for testing.
*/
@Slf4j
public abstract class EtcdTestBase {

@Rule
public Timeout globalTimeout = Timeout.seconds(120);

protected static EtcdContainer etcdContainer;

@BeforeClass
Expand Down

0 comments on commit 1cf282c

Please sign in to comment.