1818import static org .junit .jupiter .api .Assertions .assertTrue ;
1919
2020import io .reactivex .disposables .Disposable ;
21- import net .flashbots .models .bundle .*;
21+ import net .flashbots .models .bundle .BundleItemType ;
22+ import net .flashbots .models .bundle .BundleParams ;
23+ import net .flashbots .models .bundle .BundlePrivacy ;
24+ import net .flashbots .models .bundle .HintPreferences ;
25+ import net .flashbots .models .bundle .Inclusion ;
26+ import net .flashbots .models .bundle .PrivateTxOptions ;
27+ import net .flashbots .models .bundle .SendBundleResponse ;
28+ import net .flashbots .models .bundle .SimBundleOptions ;
2229import net .flashbots .models .common .Network ;
2330import net .flashbots .models .event .EventHistoryEntry ;
2431import net .flashbots .models .event .EventHistoryInfo ;
2532import net .flashbots .models .event .EventHistoryParams ;
2633import net .flashbots .models .event .MevShareEvent ;
34+ import org .junit .jupiter .api .AfterAll ;
2735import org .junit .jupiter .api .BeforeAll ;
2836import org .junit .jupiter .api .Disabled ;
2937import org .junit .jupiter .api .DisplayName ;
4856 * @author kaichen
4957 * @since 0.1.0
5058 */
51- @ Disabled
5259class MevShareClientTest {
5360
5461 private static Credentials AUTH_SIGNER ;
@@ -64,8 +71,13 @@ static void beforeAll()
6471 throws InvalidAlgorithmParameterException , NoSuchAlgorithmException , NoSuchProviderException {
6572 AUTH_SIGNER = Credentials .create (Keys .createEcKeyPair ());
6673 SIGNER = Credentials .create (System .getenv ("SIGNER_PRIVATE_KEY" ));
67- MEV_SHARE_CLIENT = new MevShareClient (Network .GOERLI , AUTH_SIGNER , WEB3J );
6874 WEB3J = Web3j .build (new HttpService (System .getenv ("GOERLI_RPC_URL" )));
75+ MEV_SHARE_CLIENT = new MevShareClient (Network .GOERLI , AUTH_SIGNER , WEB3J );
76+ }
77+
78+ @ AfterAll
79+ static void afterAll () {
80+ MEV_SHARE_CLIENT .close ();
6981 }
7082
7183 /**
@@ -100,6 +112,7 @@ void getEventHistory() throws ExecutionException, InterruptedException {
100112
101113 @ Test
102114 @ DisplayName ("Subscribe event" )
115+ @ Disabled
103116 void subscribeEvent () throws InterruptedException , ExecutionException {
104117 final CountDownLatch latch = new CountDownLatch (3 );
105118 var ref = new AtomicReference <MevShareEvent >();
@@ -116,6 +129,7 @@ void subscribeEvent() throws InterruptedException, ExecutionException {
116129
117130 @ Test
118131 @ DisplayName ("Send bundle with hash" )
132+ @ Disabled
119133 void sendBundle ()
120134 throws InvalidAlgorithmParameterException , NoSuchAlgorithmException , NoSuchProviderException ,
121135 ExecutionException , InterruptedException , IOException {
@@ -315,6 +329,7 @@ void sendPrivateTransaction()
315329
316330 @ Test
317331 @ DisplayName ("Subscribe tx event" )
332+ @ Disabled
318333 void subscribeTx () throws ExecutionException , InterruptedException {
319334 CompletableFuture <MevShareEvent > future = new CompletableFuture <>();
320335 Disposable disposable = MEV_SHARE_CLIENT .subscribeTx (mevShareEvent -> {
0 commit comments