Skip to content

Commit

Permalink
chore(test): get rid of wait_for_objects_snapshot_catchup
Browse files Browse the repository at this point in the history
## Description
This used to be part of the interface neded by the transactional test
runner to talk to the off chain state of the test cluster, but it is no
longer in use (and isn't necessary for `sui-indexer-alt`), so it's
easiest to get rid of it.

## Test plan

```
sui$ cargo nextest run         \
  -p sui-indexer-alt-e2e-tests \
  -p sui-graphql-e2e-tests
```
  • Loading branch information
amnn committed Jan 17, 2025
1 parent 920c535 commit 4d7b082
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 16 deletions.
6 changes: 0 additions & 6 deletions crates/sui-graphql-e2e-tests/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ pub struct OffchainReaderForAdapter {

#[async_trait]
impl OffchainStateReader for OffchainReaderForAdapter {
async fn wait_for_objects_snapshot_catchup(&self, base_timeout: Duration) {
self.cluster
.wait_for_objects_snapshot_catchup(base_timeout)
.await
}

async fn wait_for_checkpoint_catchup(&self, checkpoint: u64, base_timeout: Duration) {
self.cluster
.wait_for_checkpoint_catchup(checkpoint, base_timeout)
Expand Down
4 changes: 0 additions & 4 deletions crates/sui-indexer-alt-e2e-tests/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,6 @@ impl OffchainReader {

#[async_trait::async_trait]
impl OffchainStateReader for OffchainReader {
async fn wait_for_objects_snapshot_catchup(&self, _: Duration) {
// Not necessary for `sui-indexer-alt`
}

async fn wait_for_checkpoint_catchup(&self, checkpoint: u64, base_timeout: Duration) {
let _ = tokio::time::timeout(base_timeout, self.wait_for_checkpoint(checkpoint)).await;
}
Expand Down
4 changes: 0 additions & 4 deletions crates/sui-transactional-test-runner/src/offchain_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ pub struct TestResponse {
/// these methods are used in the `RunGraphqlCommand` to stabilize the off-chain indexed state.
#[async_trait]
pub trait OffchainStateReader: Send + Sync + 'static {
/// Polls the objects snapshot table until it is within the allowed lag from the latest
/// checkpoint.
async fn wait_for_objects_snapshot_catchup(&self, base_timeout: Duration);

/// Polls the checkpoint table until the given checkpoint is committed.
async fn wait_for_checkpoint_catchup(&self, checkpoint: u64, base_timeout: Duration);

Expand Down
2 changes: 0 additions & 2 deletions crates/sui-transactional-test-runner/src/test_adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -624,8 +624,6 @@ impl<'a> MoveTestAdapter<'a> for SuiTestAdapter {
.wait_for_checkpoint_catchup(highest_checkpoint, Duration::from_secs(60))
.await;

// wait_for_objects_snapshot_catchup(graphql_client, Duration::from_secs(180)).await;

if let Some(checkpoint_to_prune) = wait_for_checkpoint_pruned {
offchain_reader
.wait_for_pruned_checkpoint(checkpoint_to_prune, Duration::from_secs(60))
Expand Down

0 comments on commit 4d7b082

Please sign in to comment.