Skip to content

Commit 9e8da2d

Browse files
committed
Delete some TODO (snawaz)
1 parent 34a61a4 commit 9e8da2d

File tree

3 files changed

+28
-82
lines changed

3 files changed

+28
-82
lines changed

magicblock-committor-service/src/tasks/args_task.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ impl BaseTask for ArgsTask {
9191
ArgsTaskType::Commit(mut value) if value.is_commit_diff() => {
9292
// TODO (snawaz): Currently, we do not support executing CommitDiff
9393
// as BufferTask, which is why we're forcing CommitTask to use CommitState
94-
// before converting this task into BufferTask Once CommitDiff is supported
94+
// before converting this task into BufferTask. Once CommitDiff is supported
9595
// by BufferTask, we do not have to force_commit_state and we can remove
9696
// force_commit_state stuff, as it's essentially a downgrade.
9797

test-integration/test-committor-service/tests/test_delivery_preparator.rs

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ use crate::common::{create_commit_task, generate_random_bytes, TestFixture};
1616

1717
mod common;
1818

19-
// TODO (snawaz): use #[tokio::test] once CommitTask::new() stops using blocking RpcClient
20-
// # see the PR #575 for more context.
21-
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
19+
#[tokio::test]
2220
async fn test_prepare_10kb_buffer() {
2321
let fixture = TestFixture::new().await;
2422
let preparator = fixture.create_delivery_preparator();
@@ -79,9 +77,7 @@ async fn test_prepare_10kb_buffer() {
7977
);
8078
}
8179

82-
// TODO (snawaz): use #[tokio::test] once CommitTask::new() stops using blocking RpcClient
83-
// # see the PR #575 for more context.
84-
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
80+
#[tokio::test]
8581
async fn test_prepare_multiple_buffers() {
8682
let fixture = TestFixture::new().await;
8783
let preparator = fixture.create_delivery_preparator();
@@ -207,9 +203,7 @@ async fn test_lookup_tables() {
207203
}
208204
}
209205

210-
// TODO (snawaz): use #[tokio::test] once CommitTask::new() stops using blocking RpcClient
211-
// # see the PR #575 for more context.
212-
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
206+
#[tokio::test]
213207
async fn test_already_initialized_error_handled() {
214208
let fixture = TestFixture::new().await;
215209
let preparator = fixture.create_delivery_preparator();
@@ -291,9 +285,7 @@ async fn test_already_initialized_error_handled() {
291285
assert_eq!(account.data.as_slice(), data, "Unexpected account data");
292286
}
293287

294-
// TODO (snawaz): use #[tokio::test] once CommitTask::new() stops using blocking RpcClient
295-
// # see the PR #575 for more context.
296-
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
288+
#[tokio::test]
297289
async fn test_prepare_cleanup_and_reprepare_mixed_tasks() {
298290
use borsh::BorshDeserialize;
299291

test-integration/test-committor-service/tests/test_ix_commit_local.rs

Lines changed: 23 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -62,44 +62,32 @@ fn expect_strategies(
6262
// Single Account Commits
6363
// -----------------
6464

65-
// TODO (snawaz): use #[tokio::test] once CommitTask::new() stops using blocking RpcClient
66-
// # see the PR #575 for more context.
67-
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
65+
#[tokio::test]
6866
async fn test_ix_commit_single_account_100_bytes() {
6967
commit_single_account(100, CommitStrategy::Args, false).await;
7068
}
7169

72-
// TODO (snawaz): use #[tokio::test] once CommitTask::new() stops using blocking RpcClient
73-
// # see the PR #575 for more context.
74-
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
70+
#[tokio::test]
7571
async fn test_ix_commit_single_account_100_bytes_and_undelegate() {
7672
commit_single_account(100, CommitStrategy::Args, true).await;
7773
}
7874

79-
// TODO (snawaz): use #[tokio::test] once CommitTask::new() stops using blocking RpcClient
80-
// # see the PR #575 for more context.
81-
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
75+
#[tokio::test]
8276
async fn test_ix_commit_single_account_800_bytes() {
8377
commit_single_account(800, CommitStrategy::FromBuffer, false).await;
8478
}
8579

86-
// TODO (snawaz): use #[tokio::test] once CommitTask::new() stops using blocking RpcClient
87-
// # see the PR #575 for more context.
88-
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
80+
#[tokio::test]
8981
async fn test_ix_commit_single_account_800_bytes_and_undelegate() {
9082
commit_single_account(800, CommitStrategy::FromBuffer, true).await;
9183
}
9284

93-
// TODO (snawaz): use #[tokio::test] once CommitTask::new() stops using blocking RpcClient
94-
// # see the PR #575 for more context.
95-
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
85+
#[tokio::test]
9686
async fn test_ix_commit_single_account_one_kb() {
9787
commit_single_account(1024, CommitStrategy::FromBuffer, false).await;
9888
}
9989

100-
// TODO (snawaz): use #[tokio::test] once CommitTask::new() stops using blocking RpcClient
101-
// # see the PR #575 for more context.
102-
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
90+
#[tokio::test]
10391
async fn test_ix_commit_single_account_ten_kb() {
10492
commit_single_account(10 * 1024, CommitStrategy::FromBuffer, false).await;
10593
}
@@ -167,9 +155,7 @@ async fn commit_single_account(
167155
// Multiple Account Commits
168156
// -----------------
169157

170-
// TODO (snawaz): use #[tokio::test] once CommitTask::new() stops using blocking RpcClient
171-
// # see the PR #575 for more context.
172-
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
158+
#[tokio::test]
173159
async fn test_ix_commit_two_accounts_1kb_2kb() {
174160
init_logger!();
175161
commit_multiple_accounts(
@@ -181,9 +167,7 @@ async fn test_ix_commit_two_accounts_1kb_2kb() {
181167
.await;
182168
}
183169

184-
// TODO (snawaz): use #[tokio::test] once CommitTask::new() stops using blocking RpcClient
185-
// # see the PR #575 for more context.
186-
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
170+
#[tokio::test]
187171
async fn test_ix_commit_two_accounts_512kb() {
188172
init_logger!();
189173
commit_multiple_accounts(
@@ -195,9 +179,7 @@ async fn test_ix_commit_two_accounts_512kb() {
195179
.await;
196180
}
197181

198-
// TODO (snawaz): use #[tokio::test] once CommitTask::new() stops using blocking RpcClient
199-
// # see the PR #575 for more context.
200-
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
182+
#[tokio::test]
201183
async fn test_ix_commit_three_accounts_512kb() {
202184
init_logger!();
203185
commit_multiple_accounts(
@@ -209,9 +191,7 @@ async fn test_ix_commit_three_accounts_512kb() {
209191
.await;
210192
}
211193

212-
// TODO (snawaz): use #[tokio::test] once CommitTask::new() stops using blocking RpcClient
213-
// # see the PR #575 for more context.
214-
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
194+
#[tokio::test]
215195
async fn test_ix_commit_six_accounts_512kb() {
216196
init_logger!();
217197
commit_multiple_accounts(
@@ -223,9 +203,7 @@ async fn test_ix_commit_six_accounts_512kb() {
223203
.await;
224204
}
225205

226-
// TODO (snawaz): use #[tokio::test] once CommitTask::new() stops using blocking RpcClient
227-
// # see the PR #575 for more context.
228-
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
206+
#[tokio::test]
229207
async fn test_ix_commit_four_accounts_1kb_2kb_5kb_10kb_single_bundle() {
230208
init_logger!();
231209
commit_multiple_accounts(
@@ -237,17 +215,13 @@ async fn test_ix_commit_four_accounts_1kb_2kb_5kb_10kb_single_bundle() {
237215
.await;
238216
}
239217

240-
// TODO (snawaz): use #[tokio::test] once CommitTask::new() stops using blocking RpcClient
241-
// # see the PR #575 for more context.
242-
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
218+
#[tokio::test]
243219
async fn test_commit_20_accounts_1kb_bundle_size_2() {
244220
commit_20_accounts_1kb(2, expect_strategies(&[(CommitStrategy::Args, 20)]))
245221
.await;
246222
}
247223

248-
// TODO (snawaz): use #[tokio::test] once CommitTask::new() stops using blocking RpcClient
249-
// # see the PR #575 for more context.
250-
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
224+
#[tokio::test]
251225
async fn test_commit_5_accounts_1kb_bundle_size_3() {
252226
commit_5_accounts_1kb(
253227
3,
@@ -257,9 +231,7 @@ async fn test_commit_5_accounts_1kb_bundle_size_3() {
257231
.await;
258232
}
259233

260-
// TODO (snawaz): use #[tokio::test] once CommitTask::new() stops using blocking RpcClient
261-
// # see the PR #575 for more context.
262-
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
234+
#[tokio::test]
263235
async fn test_commit_5_accounts_1kb_bundle_size_3_undelegate_all() {
264236
commit_5_accounts_1kb(
265237
3,
@@ -273,9 +245,7 @@ async fn test_commit_5_accounts_1kb_bundle_size_3_undelegate_all() {
273245
.await;
274246
}
275247

276-
// TODO (snawaz): use #[tokio::test] once CommitTask::new() stops using blocking RpcClient
277-
// # see the PR #575 for more context.
278-
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
248+
#[tokio::test]
279249
async fn test_commit_5_accounts_1kb_bundle_size_4() {
280250
commit_5_accounts_1kb(
281251
4,
@@ -288,9 +258,7 @@ async fn test_commit_5_accounts_1kb_bundle_size_4() {
288258
.await;
289259
}
290260

291-
// TODO (snawaz): use #[tokio::test] once CommitTask::new() stops using blocking RpcClient
292-
// # see the PR #575 for more context.
293-
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
261+
#[tokio::test]
294262
async fn test_commit_5_accounts_1kb_bundle_size_4_undelegate_all() {
295263
commit_5_accounts_1kb(
296264
4,
@@ -303,9 +271,7 @@ async fn test_commit_5_accounts_1kb_bundle_size_4_undelegate_all() {
303271
.await;
304272
}
305273

306-
// TODO (snawaz): use #[tokio::test] once CommitTask::new() stops using blocking RpcClient
307-
// # see the PR #575 for more context.
308-
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
274+
#[tokio::test]
309275
async fn test_commit_5_accounts_1kb_bundle_size_5_undelegate_all() {
310276
commit_5_accounts_1kb(
311277
5,
@@ -315,17 +281,13 @@ async fn test_commit_5_accounts_1kb_bundle_size_5_undelegate_all() {
315281
.await;
316282
}
317283

318-
// TODO (snawaz): use #[tokio::test] once CommitTask::new() stops using blocking RpcClient
319-
// # see the PR #575 for more context.
320-
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
284+
#[tokio::test]
321285
async fn test_commit_20_accounts_1kb_bundle_size_3() {
322286
commit_20_accounts_1kb(3, expect_strategies(&[(CommitStrategy::Args, 20)]))
323287
.await;
324288
}
325289

326-
// TODO (snawaz): use #[tokio::test] once CommitTask::new() stops using blocking RpcClient
327-
// # see the PR #575 for more context.
328-
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
290+
#[tokio::test]
329291
async fn test_commit_20_accounts_1kb_bundle_size_4() {
330292
commit_20_accounts_1kb(
331293
4,
@@ -334,9 +296,7 @@ async fn test_commit_20_accounts_1kb_bundle_size_4() {
334296
.await;
335297
}
336298

337-
// TODO (snawaz): use #[tokio::test] once CommitTask::new() stops using blocking RpcClient
338-
// # see the PR #575 for more context.
339-
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
299+
#[tokio::test]
340300
async fn test_commit_20_accounts_1kb_bundle_size_6() {
341301
commit_20_accounts_1kb(
342302
6,
@@ -349,9 +309,7 @@ async fn test_commit_20_accounts_1kb_bundle_size_6() {
349309
.await;
350310
}
351311

352-
// TODO (snawaz): use #[tokio::test] once CommitTask::new() stops using blocking RpcClient
353-
// # see the PR #575 for more context.
354-
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
312+
#[tokio::test]
355313
async fn test_commit_20_accounts_1kb_bundle_size_20() {
356314
commit_20_accounts_1kb(
357315
20,
@@ -360,9 +318,7 @@ async fn test_commit_20_accounts_1kb_bundle_size_20() {
360318
.await;
361319
}
362320

363-
// TODO (snawaz): use #[tokio::test] once CommitTask::new() stops using blocking RpcClient
364-
// # see the PR #575 for more context.
365-
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
321+
#[tokio::test]
366322
async fn test_commit_8_accounts_1kb_bundle_size_8() {
367323
commit_8_accounts_1kb(
368324
8,
@@ -375,9 +331,7 @@ async fn test_commit_8_accounts_1kb_bundle_size_8() {
375331
.await;
376332
}
377333

378-
// TODO (snawaz): use #[tokio::test] once CommitTask::new() stops using blocking RpcClient
379-
// # see the PR #575 for more context.
380-
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
334+
#[tokio::test]
381335
async fn test_commit_20_accounts_1kb_bundle_size_8() {
382336
commit_20_accounts_1kb(
383337
8,

0 commit comments

Comments
 (0)