Skip to content

Conversation

DifferentialOrange
Copy link
Member

This PR introduces various test improvements, mostly related to waiting for various async tasks to be completed if a test case expects them to be completed. This improvements are required to properly solve #412 and #415 since, after introducing more async things, flaky tests starts to fail more often. Also previous PRs had ignored the possibility of creating schema on yet ro instance. This PR also covers this issues. This PR does not yet solve #412, so tests still may fail.

I didn't forget about

  • Tests

Part of #412
Part of #415

@DifferentialOrange DifferentialOrange changed the title Stabilize tests before Tarantool 3 features Stabilize tests for Tarantool 3 features Mar 22, 2024
@DifferentialOrange DifferentialOrange force-pushed the DifferentialOrange/gh-412-test-stabilization branch from 41b401a to 5dd3ade Compare March 22, 2024 14:57
Some read cases were missing in #404, #406 and #408 test stabilization
commits. This patch updates missing read cases.

1. https://github.com/tarantool/crud/actions/runs/7322196516/job/19943422319

Follows #404
Part of #412
Part of #415
Index alias provide stable info on instance nature, yet servers list
index doesn't.

Part of #412
Part of #415
Before this patch, most tests used an assumption that main server is
a router. Yet these are two different concepts.

`main_server` entity was introduced in Cartridge test helpers Cluster
as some server you may refer to for maintenance work, like clusterwide
configuration update. Any cluster server is fine to do such operation:
router or not. Since most cluster configurations start with router
definition, it is often a first server in a list and is chosen to be
main_server as well. But no one guarantees that main_server provides
router API (both for vshard and crud).

Part of #412
Part of #415
@DifferentialOrange DifferentialOrange force-pushed the DifferentialOrange/gh-412-test-stabilization branch from 5dd3ade to ed48cf4 Compare March 25, 2024 10:45
Tarantool 3.0 instances start in ro mode. It is possible that masters
are not available for write requests right after test case has been
started.

Cartridge servers run only on Tarantool 1.x and 2.x, so they are
expected to work fine without additional changes: Cartridge helpers
checks are sophisticated enough.

Part of #412
Part of #415
Wait until crud is ready in tests. It doesn't make a lot of sense now
since crud init calls are syncronized (even though some vshard opts can
be async and now we wait for them too), but will be crucial in case we
bootstrap asynchronously.

Part of #412
Part of #415
Wait until replication is finished if test case is a read request from
replica.

Part of #412
Part of #415
@DifferentialOrange DifferentialOrange force-pushed the DifferentialOrange/gh-412-test-stabilization branch 3 times, most recently from 9e99bd1 to 234560e Compare March 25, 2024 13:54
@DifferentialOrange DifferentialOrange marked this pull request as ready for review March 25, 2024 14:29
@DifferentialOrange DifferentialOrange force-pushed the DifferentialOrange/gh-412-test-stabilization branch 5 times, most recently from b5710cf to fa6e411 Compare March 26, 2024 07:30
@DifferentialOrange
Copy link
Member Author

DifferentialOrange commented Mar 26, 2024

Sorry for force-pushes after review requests, should be fine now.

Copy link
Contributor

@better0fdead better0fdead left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, code seems fine. just small comment.

})
end)
end,
} No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add newline at the EOF

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Tarantool 3.0 instances start in ro mode. It is possible that masters
are not available for write requests right after test case has been
started.

This patch supports only vshard tests for Tarantool 2.2+. After this
patch, schema init is async and we wait for schema to initialize in
tests.

Part of #412
Part of #415
This patch removes vinyl from test matrices. Since [1], vinyl is
considered experimental and we do not guarantee its work with modules.
Vinyl clusters like to misbehave in tests, often resulting in failing
tests in CI. To improve developer experience, this patch disables them.

This patch do not remove vinyl support since there is no vinyl-specific
code in crud, but we do not guarantee it anymore.

1. tarantool/doc#3523

Part of #412
Part of #415
@DifferentialOrange DifferentialOrange force-pushed the DifferentialOrange/gh-412-test-stabilization branch from 55bd35d to b58f9b4 Compare March 27, 2024 13:19
@DifferentialOrange DifferentialOrange merged commit 26725d0 into master Mar 27, 2024
@DifferentialOrange DifferentialOrange deleted the DifferentialOrange/gh-412-test-stabilization branch March 27, 2024 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants