Skip to content

Commit

Permalink
Calling SignatureAlgorithmFactory::resetInstance before test (hyperle…
Browse files Browse the repository at this point in the history
…dger#3011) (hyperledger#3025)

The NodeKeyTest might fail in case the SignatureAlgorithmFactory has an
instance already set from some previous test.

Signed-off-by: Jiri Peinlich <jiri.peinlich@gmail.com>

Co-authored-by: Sally MacFarlane <sally.macfarlane@consensys.net>
  • Loading branch information
gezero and macfarla authored Nov 10, 2021
1 parent 65e0373 commit 3658ef0
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,16 @@
import org.apache.tuweni.bytes.Bytes;
import org.apache.tuweni.bytes.Bytes32;
import org.assertj.core.api.Assertions;
import org.junit.Before;
import org.junit.Test;

public class NodeKeyTest {

@Before
public void resetInstance() {
SignatureAlgorithmFactory.resetInstance();
}

@Test
public void publicKeyShouldMatch() {
final Bytes keyPairPubKey =
Expand Down

0 comments on commit 3658ef0

Please sign in to comment.