Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split expect tests into separate circleci group #2792

Merged
merged 11 commits into from
Aug 25, 2021

Conversation

winder
Copy link
Contributor

@winder winder commented Aug 23, 2021

Summary

Attempt to split expect tests into a 3rd category.

This changes the behavior of e2e_go_tests.sh. Previously it would run the e2e_go tests AND the EXPECT tests. Now it runs one or the other.

Test Plan

CI

@winder winder marked this pull request as ready for review August 23, 2021 20:30
@codecov-commenter
Copy link

codecov-commenter commented Aug 23, 2021

Codecov Report

Merging #2792 (85d8860) into master (bd5a000) will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2792      +/-   ##
==========================================
- Coverage   47.08%   47.07%   -0.02%     
==========================================
  Files         349      349              
  Lines       56401    56401              
==========================================
- Hits        26558    26550       -8     
- Misses      26865    26871       +6     
- Partials     2978     2980       +2     
Impacted Files Coverage Δ
ledger/blockqueue.go 81.03% <0.00%> (-4.03%) ⬇️
catchup/peerSelector.go 98.95% <0.00%> (-1.05%) ⬇️
network/requestTracker.go 70.25% <0.00%> (-0.87%) ⬇️
ledger/acctupdates.go 62.13% <0.00%> (-0.42%) ⬇️
network/wsNetwork.go 60.90% <0.00%> (-0.19%) ⬇️
data/transactions/verify/txn.go 45.08% <0.00%> (ø)
network/wsPeer.go 75.20% <0.00%> (+0.83%) ⬆️
crypto/merkletrie/node.go 93.48% <0.00%> (+1.86%) ⬆️
crypto/merkletrie/trie.go 68.61% <0.00%> (+2.18%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bd5a000...85d8860. Read the comment docs.

@tsachiherman
Copy link
Contributor

@winder I'm ok with this - but please fix the review dog errors.

@algorandskiy
Copy link
Contributor

LGTM, just remove from goal_expect_test.go

	t.Skip("goal expect test are disabled due to flakiness")

algorandskiy
algorandskiy previously approved these changes Aug 23, 2021
Copy link
Contributor

@algorandskiy algorandskiy left a comment

Choose a reason for hiding this comment

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

Let's see if it works

@algobarb
Copy link
Contributor

Can we also test that nightly tests will work as expected too? Just in case there are expect tests that are disabled in -short that may still be impacted. To test, you can remove all slack references and replace /hotfix\/.*/ with/pull\/[0-9]+/

@winder
Copy link
Contributor Author

winder commented Aug 23, 2021

Can we also test that nightly tests will work as expected too? Just in case there are expect tests that are disabled in -short that may still be impacted. To test, you can remove all slack references and replace /hotfix\/.*/ with/pull\/[0-9]+/

All of the expect tests go through the same test function, and it doesn't use Short, so this wouldn't change anything.

I thought we didn't have any tests using that option in e2e-go, but there are some:

~/go/src/github.com/algorand/go-algorand/test/e2e-go$ rg Short
features/participation/overlappingParticipationKeys_test.go
64:	// ShortParticipationKeys template has LastPartKeyRound=8
66:	fixture.SetupNoStart(t, filepath.Join("nettemplates", "ShortParticipationKeys.json"))

features/participation/participationRewards_test.go
143:	if testing.Short() {

features/teal/compile_test.go
34:	if testing.Short() {

features/catchup/catchpointCatchup_test.go
85:	if testing.Short() {

features/catchup/basicCatchup_test.go
37:	if testing.Short() {
105:	if testing.Short() {
205:	if testing.Short() {

features/participation/onlineOfflineParticipation_test.go
111:	if testing.Short() {

features/partitionRecovery/partitionRecovery_test.go
36:	if testing.Short() {
82:	if testing.Short() {
104:	if testing.Short() {
167:	if testing.Short() {
220:	if testing.Short() {

features/transactions/sendReceive_test.go
48:	if testing.Short() {
58:	if testing.Short() {

features/transactions/asset_test.go
192:	if testing.Short() {
978:	if testing.Short() {
985:	// Setting the testShorterLookback parameters derived from ConsensusCurrentVersion
999:	a, fixture, client, account0 := setupTestAndNetwork(t, "TwoNodes50EachTestShorterLookback.json", configurableConsensus)

Copy link
Contributor

@algorandskiy algorandskiy left a comment

Choose a reason for hiding this comment

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

Looks like it is passing so it is working, voting for merging the PR in.

@algobarb
Copy link
Contributor

algobarb commented Aug 25, 2021

Looks good. Tests passed and if they are separated out, then like you said, it shouldn't affect the nightly integration tests in terms of CPU consumption.

@tsachiherman tsachiherman merged commit 2e7fc77 into algorand:master Aug 25, 2021
@cce
Copy link
Contributor

cce commented Aug 26, 2021

This seems to have made the overall build time slower — due to splitting these out from the "integration" job (which was sharded by 4 nodes) into a new unsharded job. Also, I am confused, what is left in the old "integration" job now?

image

@winder winder deleted the will/integration_tests branch August 26, 2021 13:36
steps:
- prepare_go
- generic_integration:
result_subdir: amd64-e2e_subs
Copy link
Contributor

Choose a reason for hiding this comment

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

The result_subdir here doesn't match

@winder
Copy link
Contributor Author

winder commented Aug 26, 2021

@cce we have 3 main types of integration tests:

  1. "scripts", also referred to as "e2e subs", are the bash scripts executed (mostly in parallel) by e2e_client_runner.py
  2. "go tests", referred to here as "integration", are integration tests written in go. We have a number of fixtures in test/e2e-go. Basically this is go test in that directory.
  3. "expect tests" are a subset of the "go tests". There is a fixture in the "go tests" to execute tests written with expect.

The expect tests take a long time to run and have been disabled for a while. Maybe the expect tests don't shard properly because they run through a single fixture?

amd64_e2e_expect:
machine:
image: ubuntu-2004:202104-01
resource_class: large
Copy link
Contributor

Choose a reason for hiding this comment

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

I think these tests were running as part of the "integration" job before, so this upgrades the resource_class from "medium" to "large" — we might want to go back down

@@ -89,18 +99,24 @@ if [[ "${ARCHTYPE}" = arm* ]]; then
PARALLEL_FLAG="-p 1"
fi

PACKAGES="./..."
if [ "$RUN_EXPECT" != "" ]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this means that whether or not RUN_EXPECT is set to FALSE or TRUE (and it is set to FALSE by default at the top of this file) we will only ever run the expect tests.

Copy link
Contributor

Choose a reason for hiding this comment

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

Opened #2863

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants