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

Running spec parallelly for clean test template #1759

Merged

Conversation

amitkrout
Copy link
Contributor

What is the purpose of this change? What does it change?

To reduce test time both locally and on CI too.

Was the change discussed in an issue?

fixes - part of #1473

How to test changes?

make clean-test

.travis.yml Outdated
@@ -34,6 +34,7 @@ jobs:
- make bin
- sudo cp odo /usr/bin
- oc login -u developer
- travis_wait make clean-test
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Keeping it only for testing purpose on travis. Will be removed before merge

@@ -11,6 +11,7 @@ make configure-installer-tests-cluster
make bin
export PATH="$PATH:$(pwd)"
export CUSTOM_HOMEDIR="/tmp/artifacts"
make clean-test
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Keeping it only for testing purpose on prow. Will be removed before merge

@amitkrout
Copy link
Contributor Author

/hold

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. Required by Prow. label May 22, 2019
@amitkrout
Copy link
Contributor Author

/hold cancel

@openshift-ci-robot openshift-ci-robot removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. Required by Prow. labels May 23, 2019
@amitkrout
Copy link
Contributor Author

ping @mohammedzee1000 @dharmit PTAL

@mohammedzee1000
Copy link
Contributor

How are you installing ginko here?

@amitkrout
Copy link
Contributor Author

@mohammedzee1000
Copy link
Contributor

/approve

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mohammedzee1000

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

1 similar comment
@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mohammedzee1000

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. Required by Prow. label May 23, 2019
@girishramnani
Copy link
Contributor

a bit of documentation around SPEC_EXEC_METHOD? what does it do?

Also maybe a section in the our docs on running tests parallel or serially would be great @amitkrout - maybe a separate PR or in this itself

@amitkrout
Copy link
Contributor Author

a bit of documentation around SPEC_EXEC_METHOD? what does it do?

Also maybe a section in the our docs on running tests parallel or serially would be great @amitkrout - maybe a separate PR or in this itself

Will add the doc change around SPEC_EXEC_METHOD in this. Reference of SPEC_EXEC_METHOD in doc helps to choose run style (parallel or series).

@amitkrout
Copy link
Contributor Author

amitkrout commented May 24, 2019

a bit of documentation around SPEC_EXEC_METHOD? what does it do?
Also maybe a section in the our docs on running tests parallel or serially would be great @amitkrout - maybe a separate PR or in this itself

Will add the doc change around SPEC_EXEC_METHOD in this. Reference of SPEC_EXEC_METHOD in doc helps to choose run style (parallel or series).

@girishramnani Doc updated. PTAL
Thanks @Preeticp for a quick guidance :)

Copy link
Member

@cdrage cdrage left a comment

Choose a reason for hiding this comment

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

So confused with regards to this PR.

We remove the documentation about how to run e2e tests locally, but you provide documentation to use make clean-test...

Which doesn't even run all the e2e tests?

----

* For the component tests use:
* To run the test spec parallelly (default):
Copy link
Member

Choose a reason for hiding this comment

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

in parallel.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

----
$ make test-cmp-e2e
$ make clean-test
Copy link
Member

Choose a reason for hiding this comment

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

why are we using "clean-test" this is fairly confusing, why not "e2e-test" ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here the intention is to provide the doc reference to @mohammedzee1000 and @dharmit to write other remaining test for parallel run.

Makefile Outdated
.PHONY: clean-test
clean-test:
ifeq ($(SPEC_EXEC_METHOD),series)
go test -v github.com/openshift/odo/tests/template --ginkgo.focus="Example of a clean test" -ginkgo.slowSpecThreshold=$(SLOW_SPEC_THRESHOLD) -ginkgo.v -timeout $(TIMEOUT)
Copy link
Member

Choose a reason for hiding this comment

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

I don't like that we use "Example of a clean test" it makes no sense. clean-test is running all e2e tests correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, ```clean-test`` is just a template for reference of how to write clean and efficient integration/e2e test.

Copy link
Member

Choose a reason for hiding this comment

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

if it is just a template why do we need it in the makefile?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is just for a reference for @mohammedzee1000 and @dharmit who are also going to pick some of the test. In the very next sub task of #1473.

Anyway i will add a note there so that we don't forget to remove it in the next subtask fix.

@@ -160,33 +160,22 @@ $ MINISHIFT_ENABLE_EXPERIMENTAL=y minishift start --extra-clusterup-flags "--ena

.Procedure:

To deploy an integration test:
Integration tests can be run in the following two ways:
Copy link
Member

Choose a reason for hiding this comment

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

Yeah, the below information is completely wrong. You remove information on how to run the tests... (make test-e2e) and make clean-test doesn't even do anything.

You need to keep the make test-e2e here so that people can run these integration tests locally.

The documentation you're adding should be about running each test individually.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have addressed those comment here #1759 (comment). Also i ahev added extra info in the NOTE. Probably the NOTE section will clarify most of your doubts.

@cdrage
Copy link
Member

cdrage commented May 24, 2019

/hold
Please do not merge until the above comments are addressed ^^

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. Required by Prow. label May 24, 2019
@amitkrout amitkrout force-pushed the testTemplateParallel branch from 98ab997 to 72d334f Compare June 11, 2019 06:47
@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. Required by Prow. label Jun 11, 2019
@amitkrout
Copy link
Contributor Author

@amitkrout

There is absolutely no documentation on your new command (make test-integration). You should add this to the doc: https://github.com/openshift/odo/blob/98ab997b375aa87cc37cd82320233b60ca080284/docs/development.adoc

In order to show how to run all the tests instead of just make test-cmp-e2e

Done, Currently most of the test make test-integration fails due to the pending work in #1473 and will be fixed one by one

@kadel
Copy link
Member

kadel commented Jun 11, 2019

Done, Currently most of the test make test-integration fails due to the pending work in #1473 and will be fixed one by one

Then we can't merge this PR until it is fixed. There are people that are using this, and you are breaking it.

@amitkrout
Copy link
Contributor Author

Done, Currently most of the test make test-integration fails due to the pending work in #1473 and will be fixed one by one

Then we can't merge this PR until it is fixed. There are people that are using this, and you are breaking it.

Now i got the issue why it's taking long time to go in because i believe we are not in same page. My intention was to provide as much as info through doc or Makefile change to @mohammedzee1000 and @dharmit by pushing this into master first as discussed in our last sprint planning meeting. But it did not work that way.

Unassigned @mohammedzee1000 and @dharmit from issue #1473. i am going to take the full ownership of it.

@cdrage @kadel I have updated the pr. Can you pease have a look again.

@kadel
Copy link
Member

kadel commented Jun 12, 2019

Now i got the issue why it's taking long time to go in because i believe we are not in same page. My intention was to provide as much as info through doc or Makefile change to @mohammedzee1000 and @dharmit by pushing this into master first as discussed in our last sprint planning meeting. But it did not work that way.

The only issue is that you can't just add make targets that are not working that is all. If you want to provide info and guidelines do it via comments or documentation.

@amitkrout
Copy link
Contributor Author

Now i got the issue why it's taking long time to go in because i believe we are not in same page. My intention was to provide as much as info through doc or Makefile change to @mohammedzee1000 and @dharmit by pushing this into master first as discussed in our last sprint planning meeting. But it did not work that way.

The only issue is that you can't just add make targets that are not working that is all. If you want to provide info and guidelines do it via comments or documentation.

Yup, i understand. I was just enforcing the the comment #1759 (comment) which obviously not a good idea. I have updated pr

Please do a review again

@cdrage
Copy link
Member

cdrage commented Jun 12, 2019

Now i got the issue why it's taking long time to go in because i believe we are not in same page. My intention was to provide as much as info through doc or Makefile change to @mohammedzee1000 and @dharmit by pushing this into master first as discussed in our last sprint planning meeting. But it did not work that way.

The only issue is that you can't just add make targets that are not working that is all. If you want to provide info and guidelines do it via comments or documentation.

Yup, i understand. I was just enforcing the the comment #1759 (comment) which obviously not a good idea. I have updated pr

Please do a review again

That comment was intended to convey that we need documentation if you add a new Makefile command. It was since you removed the documentation on make test-e2e renamed it to make test-integration but didn't add any documentation about the command..

Copy link
Member

@cdrage cdrage left a comment

Choose a reason for hiding this comment

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

changes LGTM.

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. Required by Prow. label Jun 12, 2019
@amitkrout
Copy link
Contributor Author

/hold cancel

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. Required by Prow. label Jun 12, 2019
@amitkrout
Copy link
Contributor Author

/refresh

@openshift-merge-robot openshift-merge-robot merged commit 4eeaaf9 into redhat-developer:master Jun 12, 2019
@rm3l rm3l added the estimated-size/S (5-10) Rough sizing for Epics. Less then one sprint of work for one person label Jun 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. Required by Prow. estimated-size/S (5-10) Rough sizing for Epics. Less then one sprint of work for one person lgtm Indicates that a PR is ready to be merged. Required by Prow.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants