File tree Expand file tree Collapse file tree 3 files changed +15
-3
lines changed
test-committor-service/tests Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -147,7 +147,7 @@ async fn commit_single_account(
147147 . await ;
148148}
149149
150- // TODO(thlorenz): once delegation program supports larger commits
150+ // TODO(thlorenz/snawaz ): once delegation program supports larger commits
151151// add 1MB and 10MB tests
152152
153153// -----------------
@@ -213,7 +213,9 @@ async fn test_ix_commit_four_accounts_1kb_2kb_5kb_10kb_single_bundle() {
213213 . await ;
214214}
215215
216- #[ tokio:: test]
216+ // TODO (snawaz): use #[tokio::test] once CommitTask::new() stops using blocking RpcClient
217+ // # see the PR #575 for more context.
218+ #[ tokio:: test( flavor = "multi_thread" , worker_threads = 2 ) ]
217219async fn test_commit_20_accounts_1kb_bundle_size_2 ( ) {
218220 commit_20_accounts_1kb (
219221 2 ,
Original file line number Diff line number Diff line change @@ -120,7 +120,17 @@ pub async fn tx_logs_contain(
120120 . log_messages
121121 . clone ( )
122122 . unwrap_or_else ( Vec :: new) ;
123- logs. iter ( ) . any ( |log| log. contains ( needle) )
123+ logs. iter ( ) . any ( |log| {
124+ // Lots of existing tests pass "CommitState" as needle argument to this function, but since now CommitTask
125+ // could invoke CommitState or CommitDiff depending on the size of the account, we also look for "CommitDiff"
126+ // in the logs when needle == CommitState. It's easier to make this little adjustment here than computing
127+ // the decision and passing either CommitState or CommitDiff from the tests themselves.
128+ if needle == "CommitState" {
129+ log. contains ( needle) || log. contains ( "CommitDiff" )
130+ } else {
131+ log. contains ( needle)
132+ }
133+ } )
124134}
125135
126136/// This needs to be run for each test that required a new counter to be delegated
You can’t perform that action at this time.
0 commit comments