Selenium: Create E2E test for checking Hot update feature for wsmaster#10176
Selenium: Create E2E test for checking Hot update feature for wsmaster#10176Ohrimenko1988 merged 33 commits intomasterfrom
Conversation
…orkspacesStartStopTest' and 'RolloutUpdateStrategyWithEditorTest' selenium tests
|
|
||
| private void waitRevision(int expectedRevision) { | ||
| webDriverWaitFactory | ||
| .get(100) |
There was a problem hiding this comment.
100 in unclear here. It's better to use dedicated constant to express timeout.
| + "import java.util.Random;\n" | ||
| + "\n"; | ||
|
|
||
| private static final String EXPECTED_CHANGED_TEXT = |
There was a problem hiding this comment.
looks like EXPECTED_CHANGED_TEXT = TEXT_FOR_TYPING + EXPECTED_DEFAULT_TEXT
If so, it would be clearer and simpler to defined that constant in such way.
|
|
||
| projectExplorer.quickExpandWithJavaScript(); | ||
|
|
||
| projectExplorer.openItemByVisibleNameInExplorer(NAME_OF_CHECKED_CLASS + ".java"); |
There was a problem hiding this comment.
We can avoid duplication if we will have dedicated constant to describe NAME_OF_CHECKED_CLASS_FILE = NAME_OF_CHECKED_CLASS + ".java"
| executeRolloutUpdateCommand(); | ||
|
|
||
| // check editor availability during rollout updating | ||
| Assert.assertEquals(cheTestSystemClient.getStatus(), SystemStatus.RUNNING); |
|
ci-test |
| private static final int TIMEOUT_FOR_ROLLING_UPDATE_FINISH = 100; | ||
| private static final int RESTORE_IDE_AFTER_REFRESH_TIMEOUT = 10; | ||
| private static final int EXPECTED_PREFERENCES_RESPONCE_CODE = 200; | ||
| private static final String PROJECT_NAME = "default-spring-project"; |
There was a problem hiding this comment.
May be we will use all HTTP statuses from single entry point. I propose from this: javax.ws.rs.core.Response.Status.ACCEPTED. In this case we won't need any fields for storing HTTP statuses
WDYT?
There was a problem hiding this comment.
Even more - we doesn't need to check response code so as in case of error HttpJsonResponse#request() throws one of the next type of exception: ServerException, UnauthorizedException, ForbiddenException, NotFoundException, ConflictException, BadRequestException.
So, just calling TestUserPreferencesServiceClient#getPreferences() would be enough to check if everything is okay with WS master server.
|
@Ohrimenko1988: to run tests regularly on CI we need to divide Rollout strategy tests from RecreateUpdateStrategyTest* to make it possible to run all kind of tests separately by one command: The simplest way is to move those tests in dedicated packages:
|
|
What is rollout update strategy btw? |
|
@eivantsov Good catch, thank you. Of course "Rolling update". |
|
I think it's be nice to refactor a little bit to respect K8S spec :) |
|
ci-test build report: |
What does this PR do?
Create E2E test for checking Hot update feature for wsmaster
What issues does this PR fix or reference?
Issue: #9646
Release Notes
Docs PR