[JBoss JIRA] (JBIDE-25282) IT: tests should be able to run individually and reuse resources
by Josef Kopriva (JIRA)
[ https://issues.jboss.org/browse/JBIDE-25282?page=com.atlassian.jira.plugi... ]
Josef Kopriva reassigned JBIDE-25282:
-------------------------------------
Assignee: Josef Kopriva
> IT: tests should be able to run individually and reuse resources
> ----------------------------------------------------------------
>
> Key: JBIDE-25282
> URL: https://issues.jboss.org/browse/JBIDE-25282
> Project: Tools (JBoss Tools)
> Issue Type: Epic
> Components: openshift
> Affects Versions: 4.5.1.AM3
> Reporter: Andre Dietisheim
> Assignee: Josef Kopriva
> Fix For: 4.5.x
>
>
> * integration tests should reuse OpenShift resources, not start from scratch in each test. Creating OpenShift applications for instance can easily take up to several minutes. Multiply this by ex. 100 tests and we're easily at a runtime of several hours for the whole suite.
> The Requirements that we have in reddeer OpenShift were create with re-using resources in mind.
> ** Ex. annotating a test class with
> {code}
> @RequiredProject(
> name = DatastoreOS3.TEST_PROJECT)
> {code}
> makes sure that there's a project "test-project" that exists in the OpenShift server that's being used. If it exists, the annotation would do nothing. It creates it if it doesnt exist.
> ** Ex. annotating a test class with
> {code}
> @RequiredService(
> project = DatastoreOS3.TEST_PROJECT,
> service = OpenShiftResources.NODEJS_SERVICE,
> template = OpenShiftResources.NODEJS_TEMPLATE)
> {code}
> makes sure that the test has a service called "nodejs-example" available. If it exists it wont do anything. If it doesn't, it'll create it using the NODEJS_TEMPLATE provided in the annotation.
> * All tests should be able to run indivdiually. When developing integration tests for a new feature, running the whole suite gets a big impediment. We should therefore allow all tests to be run individually
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 5 months
[JBoss JIRA] (JBIDE-25282) IT: tests should be able to run individually and reuse resources
by Andre Dietisheim (JIRA)
[ https://issues.jboss.org/browse/JBIDE-25282?page=com.atlassian.jira.plugi... ]
Andre Dietisheim updated JBIDE-25282:
-------------------------------------
Description:
* integration tests should reuse OpenShift resources, not start from scratch in each test. Creating OpenShift applications for instance can easily take up to several minutes. Multiply this by ex. 100 tests and we're easily at a runtime of several hours for the whole suite.
The Requirements that we have in reddeer OpenShift were create with re-using resources in mind.
** Ex. annotating a test class with
{code}
@RequiredProject(
name = DatastoreOS3.TEST_PROJECT)
{code}
makes sure that there's a project "test-project" that exists in the OpenShift server that's being used. If it exists, the annotation would do nothing. It creates it if it doesnt exist.
** Ex. annotating a test class with
{code}
@RequiredService(
project = DatastoreOS3.TEST_PROJECT,
service = OpenShiftResources.NODEJS_SERVICE,
template = OpenShiftResources.NODEJS_TEMPLATE)
{code}
makes sure that the test has a service called "nodejs-example" available. If it exists it wont do anything. If it doesn't, it'll create it using the NODEJS_TEMPLATE provided in the annotation.
* All tests should be able to run indivdiually. When developing integration tests for a new feature, running the whole suite gets a big impediment. We should therefore allow all tests to be run individually
was:
* integration tests should reuse OpenShift resources, not start from scratch in each test. Creating OpenShift applications for instance can easily take up to several minutes. Multiply this by ex. 100 tests and we're easily at a runtime of several hours for the whole suite.
The Requirements that we have in reddeer OpenShift were create with re-using resources in mind.
** Ex. annotating a test class with
{code}
@RequiredProject(
name = DatastoreOS3.TEST_PROJECT)
{code}
makes sure that there's a project "test-project" that exists in the OpenShift server that's being used. It would create it if it doesn't.
** Ex. annotating a test class with
{code}
@RequiredService(
project = DatastoreOS3.TEST_PROJECT,
service = OpenShiftResources.NODEJS_SERVICE,
template = OpenShiftResources.NODEJS_TEMPLATE)
{code}
makes sure that the test has a service called "nodejs-example" available. If it exists it wont do anything. If it doesn't, it'll create it using the NODEJS_TEMPLATE provided in the annotation.
* All tests should be able to run indivdiually. When developing integration tests for a new feature, running the whole suite gets a big impediment. We should therefore allow all tests to be run individually
> IT: tests should be able to run individually and reuse resources
> ----------------------------------------------------------------
>
> Key: JBIDE-25282
> URL: https://issues.jboss.org/browse/JBIDE-25282
> Project: Tools (JBoss Tools)
> Issue Type: Epic
> Components: openshift
> Affects Versions: 4.5.1.AM3
> Reporter: Andre Dietisheim
> Fix For: 4.5.x
>
>
> * integration tests should reuse OpenShift resources, not start from scratch in each test. Creating OpenShift applications for instance can easily take up to several minutes. Multiply this by ex. 100 tests and we're easily at a runtime of several hours for the whole suite.
> The Requirements that we have in reddeer OpenShift were create with re-using resources in mind.
> ** Ex. annotating a test class with
> {code}
> @RequiredProject(
> name = DatastoreOS3.TEST_PROJECT)
> {code}
> makes sure that there's a project "test-project" that exists in the OpenShift server that's being used. If it exists, the annotation would do nothing. It creates it if it doesnt exist.
> ** Ex. annotating a test class with
> {code}
> @RequiredService(
> project = DatastoreOS3.TEST_PROJECT,
> service = OpenShiftResources.NODEJS_SERVICE,
> template = OpenShiftResources.NODEJS_TEMPLATE)
> {code}
> makes sure that the test has a service called "nodejs-example" available. If it exists it wont do anything. If it doesn't, it'll create it using the NODEJS_TEMPLATE provided in the annotation.
> * All tests should be able to run indivdiually. When developing integration tests for a new feature, running the whole suite gets a big impediment. We should therefore allow all tests to be run individually
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 5 months
[JBoss JIRA] (JBIDE-25282) IT: tests should be able to run individually and reuse resources
by Andre Dietisheim (JIRA)
[ https://issues.jboss.org/browse/JBIDE-25282?page=com.atlassian.jira.plugi... ]
Andre Dietisheim updated JBIDE-25282:
-------------------------------------
Fix Version/s: 4.5.x
> IT: tests should be able to run individually and reuse resources
> ----------------------------------------------------------------
>
> Key: JBIDE-25282
> URL: https://issues.jboss.org/browse/JBIDE-25282
> Project: Tools (JBoss Tools)
> Issue Type: Epic
> Components: openshift
> Affects Versions: 4.5.1.AM3
> Reporter: Andre Dietisheim
> Fix For: 4.5.x
>
>
> * integration tests should reuse OpenShift resources, not start from scratch in each test. Creating OpenShift applications for instance can easily take up to several minutes. Multiply this by ex. 100 tests and we're easily at a runtime of several hours for the whole suite.
> The Requirements that we have in reddeer OpenShift were create with re-using resources in mind.
> ** Ex. annotating a test class with
> {code}
> @RequiredProject(
> name = DatastoreOS3.TEST_PROJECT)
> {code}
> makes sure that there's a project "test-project" that exists in the OpenShift server that's being used. If it exists, the annotation would do nothing. It creates it if it doesnt exist.
> ** Ex. annotating a test class with
> {code}
> @RequiredService(
> project = DatastoreOS3.TEST_PROJECT,
> service = OpenShiftResources.NODEJS_SERVICE,
> template = OpenShiftResources.NODEJS_TEMPLATE)
> {code}
> makes sure that the test has a service called "nodejs-example" available. If it exists it wont do anything. If it doesn't, it'll create it using the NODEJS_TEMPLATE provided in the annotation.
> * All tests should be able to run indivdiually. When developing integration tests for a new feature, running the whole suite gets a big impediment. We should therefore allow all tests to be run individually
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 5 months
[JBoss JIRA] (JBIDE-25282) IT: tests should be able to run individually and reuse resources
by Andre Dietisheim (JIRA)
Andre Dietisheim created JBIDE-25282:
----------------------------------------
Summary: IT: tests should be able to run individually and reuse resources
Key: JBIDE-25282
URL: https://issues.jboss.org/browse/JBIDE-25282
Project: Tools (JBoss Tools)
Issue Type: Epic
Components: openshift
Affects Versions: 4.5.1.AM3
Reporter: Andre Dietisheim
* integration tests should reuse OpenShift resources, not start from scratch in each test. Creating OpenShift applications for instance can easily take up to several minutes. Multiply this by ex. 100 tests and we're easily at a runtime of several hours for the whole suite.
The Requirements that we have in reddeer OpenShift were create with re-using resources in mind.
** Ex. annotating a test class with
{code}
@RequiredProject(
name = DatastoreOS3.TEST_PROJECT)
{code}
makes sure that there's a project "test-project" that exists in the OpenShift server that's being used. It would create it if it doesn't.
** Ex. annotating a test class with
{code}
@RequiredService(
project = DatastoreOS3.TEST_PROJECT,
service = OpenShiftResources.NODEJS_SERVICE,
template = OpenShiftResources.NODEJS_TEMPLATE)
{code}
makes sure that the test has a service called "nodejs-example" available. If it exists it wont do anything. If it doesn't, it'll create it using the NODEJS_TEMPLATE provided in the annotation.
* All tests should be able to run indivdiually. When developing integration tests for a new feature, running the whole suite gets a big impediment. We should therefore allow all tests to be run individually
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 5 months
[JBoss JIRA] (JBIDE-25142) Stabilization of integration tests for OpenShift
by Josef Kopriva (JIRA)
[ https://issues.jboss.org/browse/JBIDE-25142?page=com.atlassian.jira.plugi... ]
Josef Kopriva updated JBIDE-25142:
----------------------------------
Description:
Generally speaking there are 2 general rules of thumb that we need to aim for when fixing the tests:
* We should have integration tests that are *larger usecases*: integration tests are time consuming to run, especially when compared to unit tests. It's therefore preferable to have *a few large* integration tests than many small integration tests
* Integration tests should be *runnable individually*: the existing code base is requiring to run the tests in a specific sequence (ex. test Y is expecting an OpenShift resource - that test X creates - to exist). That's a major burden: one would have to run the whole lengthy suite to just create a new test for a new feature that was implemented
* During stabilization try to reuse projects/apps/resources as much as it is possible to reduce time for building applications, so this needs to rewrite classes
This jira tries to fix the remaining ITests for OpenShift (that are currently not included in stable suite) while aiming at the goals above:
{code:java}
// General
OCBinaryLocationTest.class,
// Connection
CreateNewConnectionTest.class,
StoreConnectionTest.class,
// Project
LinkToCreateNewProjectTest.class,
// Application wizard handling
OpenNewApplicationWizardTest.class,
OpenNewApplicationWizardWithNoProjectTest.class,
BuilderImageApplicationWizardHandlingTest.class,
// Creation of a new application
CreateApplicationFromTemplateTest.class,
CreateApplicationOnBuilderImageTest.class,
DeploymentTest.class,
// Application handling
DeleteResourceTest.class,
OSExplorerResourceTest.class,
TriggerBuildTest.class,
ImportApplicationTest.class,
PortForwardingTest.class,
LogsTest.class,
EditResourcesTest.class,
HandleCustomTemplateTest.class,
ImportApplicationWizardTest.class,
// Advanced application testing
DeployDockerImageTest.class,
CreateResourcesTest.class,
ScalingTest.class,
//Server adapter
ServerAdapterWizardHandlingTest.class,
CreateServerAdapterTest.class,
ServerAdapterFromResourceTest.class,
PublishChangesTest.class,
DebuggingEAPAppTest.class,
{code}
Test should be stable on all major platforms: Win, Linux and MacOS.
was:
Generally speaking there are 2 general rules of thumb that we need to aim for when fixing the tests:
* We should have integration tests that are *larger usecases*: integration tests are time consuming to run, especially when compared to unit tests. It's therefore preferable to have *a few large* integration tests than many small integration tests
* Integration tests should be *runnable individually*: the existing code base is requiring to run the tests in a specific sequence (ex. test Y is expecting an OpenShift resource - that test X creates - to exist). That's a major burden: one would have to run the whole lengthy suite to just create a new test for a new feature that was implemented
This jira tries to fix the remaining ITests for OpenShift (that are currently not included in stable suite) while aiming at the goals above:
{code:java}
// General
OCBinaryLocationTest.class,
// Connection
CreateNewConnectionTest.class,
StoreConnectionTest.class,
// Project
LinkToCreateNewProjectTest.class,
// Application wizard handling
OpenNewApplicationWizardTest.class,
OpenNewApplicationWizardWithNoProjectTest.class,
BuilderImageApplicationWizardHandlingTest.class,
// Creation of a new application
CreateApplicationFromTemplateTest.class,
CreateApplicationOnBuilderImageTest.class,
DeploymentTest.class,
// Application handling
DeleteResourceTest.class,
OSExplorerResourceTest.class,
TriggerBuildTest.class,
ImportApplicationTest.class,
PortForwardingTest.class,
LogsTest.class,
EditResourcesTest.class,
HandleCustomTemplateTest.class,
ImportApplicationWizardTest.class,
// Advanced application testing
DeployDockerImageTest.class,
CreateResourcesTest.class,
ScalingTest.class,
//Server adapter
ServerAdapterWizardHandlingTest.class,
CreateServerAdapterTest.class,
ServerAdapterFromResourceTest.class,
PublishChangesTest.class,
DebuggingEAPAppTest.class,
{code}
Test should be stable on all major platforms: Win, Linux and MacOS.
> Stabilization of integration tests for OpenShift
> ------------------------------------------------
>
> Key: JBIDE-25142
> URL: https://issues.jboss.org/browse/JBIDE-25142
> Project: Tools (JBoss Tools)
> Issue Type: Epic
> Components: integration-tests, openshift
> Affects Versions: 4.5.1.AM3
> Reporter: Josef Kopriva
> Assignee: Josef Kopriva
> Labels: integration_tests, openshift_v3
> Fix For: 4.5.x
>
>
> Generally speaking there are 2 general rules of thumb that we need to aim for when fixing the tests:
> * We should have integration tests that are *larger usecases*: integration tests are time consuming to run, especially when compared to unit tests. It's therefore preferable to have *a few large* integration tests than many small integration tests
> * Integration tests should be *runnable individually*: the existing code base is requiring to run the tests in a specific sequence (ex. test Y is expecting an OpenShift resource - that test X creates - to exist). That's a major burden: one would have to run the whole lengthy suite to just create a new test for a new feature that was implemented
> * During stabilization try to reuse projects/apps/resources as much as it is possible to reduce time for building applications, so this needs to rewrite classes
> This jira tries to fix the remaining ITests for OpenShift (that are currently not included in stable suite) while aiming at the goals above:
> {code:java}
> // General
> OCBinaryLocationTest.class,
> // Connection
> CreateNewConnectionTest.class,
> StoreConnectionTest.class,
>
> // Project
> LinkToCreateNewProjectTest.class,
> // Application wizard handling
> OpenNewApplicationWizardTest.class,
> OpenNewApplicationWizardWithNoProjectTest.class,
> BuilderImageApplicationWizardHandlingTest.class,
>
> // Creation of a new application
> CreateApplicationFromTemplateTest.class,
> CreateApplicationOnBuilderImageTest.class,
> DeploymentTest.class,
>
> // Application handling
> DeleteResourceTest.class,
> OSExplorerResourceTest.class,
> TriggerBuildTest.class,
> ImportApplicationTest.class,
> PortForwardingTest.class,
> LogsTest.class,
> EditResourcesTest.class,
> HandleCustomTemplateTest.class,
> ImportApplicationWizardTest.class,
> // Advanced application testing
> DeployDockerImageTest.class,
> CreateResourcesTest.class,
> ScalingTest.class,
> //Server adapter
> ServerAdapterWizardHandlingTest.class,
> CreateServerAdapterTest.class,
> ServerAdapterFromResourceTest.class,
> PublishChangesTest.class,
> DebuggingEAPAppTest.class,
> {code}
> Test should be stable on all major platforms: Win, Linux and MacOS.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 5 months
[JBoss JIRA] (JBIDE-25091) Edit resource limits wizard: setting memory resource limits errors if you use the 2 duplicate MiB entries
by Andre Dietisheim (JIRA)
[ https://issues.jboss.org/browse/JBIDE-25091?page=com.atlassian.jira.plugi... ]
Andre Dietisheim commented on JBIDE-25091:
------------------------------------------
merged into master
> Edit resource limits wizard: setting memory resource limits errors if you use the 2 duplicate MiB entries
> ---------------------------------------------------------------------------------------------------------
>
> Key: JBIDE-25091
> URL: https://issues.jboss.org/browse/JBIDE-25091
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: openshift
> Affects Versions: 4.5.1.AM2
> Reporter: Josef Kopriva
> Assignee: Andre Dietisheim
> Labels: edit_resource_limits_wizard, openshift_v3
> Fix For: 4.5.1.Final
>
> Attachments: edit-resource-limits.png, error-limit-must-be-equal-or-greater-than-request.png, image-2017-09-22-13-02-35-216.png, memory-limit-limit.png, memory-request-limit.png, request-resource-limit-combo.png, resource-limits-web-console.png, units.png
>
>
> When editing memory settings in dialog "Edit resource limits", there is a duplicate value MiB in the Combos for Memory > "Request" and Memory > "Limit":
> !edit-resource-limits.png!
> You can have setting the limits error inexplicably in the following way:
> # ASSERT: make sure that you have an application with a service, replication controller/deployment config running in OpenShift (ex. create one using the nodejs-mongo-persistent template)
> # EXEC: in OpenShift explorer: select the service for your application and pick "Edit resource limit" in the context menu for it
> # ASSERT: "Edit resource limit" dialog shows up
> # EXEC: set Memory > Request to 128 and pick the 1st MiB entry in the combo
> !memory-request-limit.png!
> # EXEC: set Memory > Limit to 512 and pick the 2nd MiB entry in the combo
> !memory-limit-limit.png!
> # EXEC: "Finish" the wizard
> Result:
> The wizard errors telling you that the limit must be equal or greater than the request:
> !error-limit-must-be-equal-or-greater-than-request.png!
> In the Eclipse log you find the following:
> {code}
> com.openshift.restclient.OpenShiftException: Exception trying to PUT https://192.168.64.12:8443/oapi/v1/namespaces/nodejs/deploymentconfigs/no... response code: 422 DeploymentConfig "nodejs-mongo-persistent" is invalid: spec.template.spec.containers[0].resources.limits: Invalid value: "512": must be greater than or equal to memory request
> at com.openshift.internal.restclient.okhttp.ResponseCodeInterceptor.createOpenShiftException(ResponseCodeInterceptor.java:114)
> at com.openshift.internal.restclient.okhttp.ResponseCodeInterceptor.intercept(ResponseCodeInterceptor.java:65)
> at okhttp3.RealCall$ApplicationInterceptorChain.proceed(RealCall.java:190)
> at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:163)
> at okhttp3.RealCall.execute(RealCall.java:57)
> at com.openshift.internal.restclient.DefaultClient.execute(DefaultClient.java:258)
> at com.openshift.internal.restclient.DefaultClient.execute(DefaultClient.java:222)
> at com.openshift.internal.restclient.DefaultClient.execute(DefaultClient.java:210)
> at com.openshift.internal.restclient.DefaultClient.update(DefaultClient.java:316)
> at org.jboss.tools.openshift.core.connection.Connection.updateResource(Connection.java:451)
> at org.jboss.tools.openshift.internal.ui.wizard.common.EditResourceLimitsHandler$EditResourceLimitsWizard$1.run(EditResourceLimitsHandler.java:117)
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)
> {code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 5 months
[JBoss JIRA] (JBIDE-25091) Edit resource limits wizard: setting memory resource limits errors if you use the 2 duplicate MiB entries
by Andre Dietisheim (JIRA)
[ https://issues.jboss.org/browse/JBIDE-25091?page=com.atlassian.jira.plugi... ]
Andre Dietisheim updated JBIDE-25091:
-------------------------------------
Story Points: 8 (was: 4)
> Edit resource limits wizard: setting memory resource limits errors if you use the 2 duplicate MiB entries
> ---------------------------------------------------------------------------------------------------------
>
> Key: JBIDE-25091
> URL: https://issues.jboss.org/browse/JBIDE-25091
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: openshift
> Affects Versions: 4.5.1.AM2
> Reporter: Josef Kopriva
> Assignee: Andre Dietisheim
> Labels: edit_resource_limits_wizard, openshift_v3
> Fix For: 4.5.1.Final
>
> Attachments: edit-resource-limits.png, error-limit-must-be-equal-or-greater-than-request.png, image-2017-09-22-13-02-35-216.png, memory-limit-limit.png, memory-request-limit.png, request-resource-limit-combo.png, resource-limits-web-console.png, units.png
>
>
> When editing memory settings in dialog "Edit resource limits", there is a duplicate value MiB in the Combos for Memory > "Request" and Memory > "Limit":
> !edit-resource-limits.png!
> You can have setting the limits error inexplicably in the following way:
> # ASSERT: make sure that you have an application with a service, replication controller/deployment config running in OpenShift (ex. create one using the nodejs-mongo-persistent template)
> # EXEC: in OpenShift explorer: select the service for your application and pick "Edit resource limit" in the context menu for it
> # ASSERT: "Edit resource limit" dialog shows up
> # EXEC: set Memory > Request to 128 and pick the 1st MiB entry in the combo
> !memory-request-limit.png!
> # EXEC: set Memory > Limit to 512 and pick the 2nd MiB entry in the combo
> !memory-limit-limit.png!
> # EXEC: "Finish" the wizard
> Result:
> The wizard errors telling you that the limit must be equal or greater than the request:
> !error-limit-must-be-equal-or-greater-than-request.png!
> In the Eclipse log you find the following:
> {code}
> com.openshift.restclient.OpenShiftException: Exception trying to PUT https://192.168.64.12:8443/oapi/v1/namespaces/nodejs/deploymentconfigs/no... response code: 422 DeploymentConfig "nodejs-mongo-persistent" is invalid: spec.template.spec.containers[0].resources.limits: Invalid value: "512": must be greater than or equal to memory request
> at com.openshift.internal.restclient.okhttp.ResponseCodeInterceptor.createOpenShiftException(ResponseCodeInterceptor.java:114)
> at com.openshift.internal.restclient.okhttp.ResponseCodeInterceptor.intercept(ResponseCodeInterceptor.java:65)
> at okhttp3.RealCall$ApplicationInterceptorChain.proceed(RealCall.java:190)
> at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:163)
> at okhttp3.RealCall.execute(RealCall.java:57)
> at com.openshift.internal.restclient.DefaultClient.execute(DefaultClient.java:258)
> at com.openshift.internal.restclient.DefaultClient.execute(DefaultClient.java:222)
> at com.openshift.internal.restclient.DefaultClient.execute(DefaultClient.java:210)
> at com.openshift.internal.restclient.DefaultClient.update(DefaultClient.java:316)
> at org.jboss.tools.openshift.core.connection.Connection.updateResource(Connection.java:451)
> at org.jboss.tools.openshift.internal.ui.wizard.common.EditResourceLimitsHandler$EditResourceLimitsWizard$1.run(EditResourceLimitsHandler.java:117)
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)
> {code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 5 months