-
-
Notifications
You must be signed in to change notification settings - Fork 148
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
Reduce CI test time by optimizing task execution #988
Merged
+179
−97
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
dac7403
Add temporary comment for measure ci time
binary-ho b7364ef
Remove unnecessary 'Get tools dependencies' step from bench, sharding…
binary-ho c90561a
Set integration test to run in parallel
binary-ho a9b6a2d
Set healthcheck test to run in non parallel
binary-ho 9cafb21
Revert "Set Test Parallel to integration package test"
binary-ho 4a6f430
Revert "Set integration test to run in parallel"
binary-ho 5aa4998
Rename sharding-test to complex-test and move tree_concurrency_test t…
binary-ho bc1d50d
Add temporary comment for ci test
binary-ho 1a7c968
Add test function and type in integration/main_test
binary-ho 22a5b7c
Trigger CI for measure time After remove cache
binary-ho aa9e6b4
Remove all temporary comments for test
binary-ho 163ca60
Move `testResult` to `main_test.go`
binary-ho 6546db1
Put the functions back in the correct place
binary-ho File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
//go:build complex | ||
|
||
/* | ||
* Copyright 2023 The Yorkie Authors. All rights reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package complex | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/yorkie-team/yorkie/server/rpc/testcases" | ||
) | ||
|
||
func TestSDKRPCServerBackendWithShardedDB(t *testing.T) { | ||
t.Run("activate/deactivate client test", func(t *testing.T) { | ||
testcases.RunActivateAndDeactivateClientTest(t, testClient) | ||
}) | ||
|
||
t.Run("attach/detach document test", func(t *testing.T) { | ||
testcases.RunAttachAndDetachDocumentTest(t, testClient) | ||
}) | ||
|
||
t.Run("attach/detach on removed document test", func(t *testing.T) { | ||
testcases.RunAttachAndDetachRemovedDocumentTest(t, testClient) | ||
}) | ||
|
||
t.Run("push/pull changes test", func(t *testing.T) { | ||
testcases.RunPushPullChangeTest(t, testClient) | ||
}) | ||
|
||
t.Run("push/pull on removed document test", func(t *testing.T) { | ||
testcases.RunPushPullChangeOnRemovedDocumentTest(t, testClient) | ||
}) | ||
|
||
t.Run("remove document test", func(t *testing.T) { | ||
testcases.RunRemoveDocumentTest(t, testClient) | ||
}) | ||
|
||
t.Run("remove document with invalid client state test", func(t *testing.T) { | ||
testcases.RunRemoveDocumentWithInvalidClientStateTest(t, testClient) | ||
}) | ||
|
||
t.Run("watch document test", func(t *testing.T) { | ||
testcases.RunWatchDocumentTest(t, testClient) | ||
}) | ||
} | ||
|
||
func TestAdminRPCServerBackendWithShardedDB(t *testing.T) { | ||
t.Run("admin signup test", func(t *testing.T) { | ||
testcases.RunAdminSignUpTest(t, testAdminClient) | ||
}) | ||
|
||
t.Run("admin login test", func(t *testing.T) { | ||
testcases.RunAdminLoginTest(t, testAdminClient) | ||
}) | ||
|
||
t.Run("admin delete account test", func(t *testing.T) { | ||
testcases.RunAdminDeleteAccountTest(t, testAdminClient) | ||
}) | ||
|
||
t.Run("admin change password test", func(t *testing.T) { | ||
testcases.RunAdminChangePasswordTest(t, testAdminClient) | ||
}) | ||
|
||
t.Run("admin create project test", func(t *testing.T) { | ||
testcases.RunAdminCreateProjectTest(t, testAdminClient, testAdminAuthInterceptor) | ||
}) | ||
|
||
t.Run("admin list projects test", func(t *testing.T) { | ||
testcases.RunAdminListProjectsTest(t, testAdminClient, testAdminAuthInterceptor) | ||
}) | ||
|
||
t.Run("admin get project test", func(t *testing.T) { | ||
testcases.RunAdminGetProjectTest(t, testAdminClient, testAdminAuthInterceptor) | ||
}) | ||
|
||
t.Run("admin update project test", func(t *testing.T) { | ||
testcases.RunAdminUpdateProjectTest(t, testAdminClient, testAdminAuthInterceptor) | ||
}) | ||
|
||
t.Run("admin list documents test", func(t *testing.T) { | ||
testcases.RunAdminListDocumentsTest(t, testAdminClient, testAdminAuthInterceptor) | ||
}) | ||
|
||
t.Run("admin get document test", func(t *testing.T) { | ||
testcases.RunAdminGetDocumentTest(t, testClient, testAdminClient, testAdminAuthInterceptor) | ||
}) | ||
|
||
t.Run("admin list changes test", func(t *testing.T) { | ||
testcases.RunAdminListChangesTest(t, testClient, testAdminClient, testAdminAuthInterceptor) | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function
syncClientsThenCheckEqual
Approved with SuggestionThe function effectively consolidates logic to synchronize clients and check document consistency. However, consider adding more detailed logging or error messages for better debuggability in case of synchronization failures.