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

fix(#126): Improves build time #203

Merged
merged 2 commits into from
Oct 4, 2017

Conversation

lordofthejars
Copy link
Member

Short description of what this resolves:

Improves build time by ignoring overlapping tests and narrow builds

Changes proposed in this pull request:

  • Ignores tests that are overlapped with other tests. Currently they are just ignored.
  • Narrow build to modules that received change.

Fixes #126

@bartoszmajsak
Copy link
Member

Can you link to the redundant test? Hard to find on the mobile ;) I also don't feel confident about having ignored test as a solution. Maybe we could evaluate the overlap and decide what to change as part of this PR?

@lordofthejars
Copy link
Member Author

lordofthejars commented Oct 2, 2017 via email

@lordofthejars
Copy link
Member Author

@MatousJobanek
Copy link
Contributor

I'm not sure if ignoring the tests is the best solution. Maybe putting these semi-redundant test classes into another test suite that will be executed nightly. But yeah, if we agree on that they are redundant, we can remove them.
As for the HistoricalChangesFailedTestsSelectionExecutionFunctionalTest.java test - is that really a redundant test, or just a bug?

I believe that we haven't used all possibilities of parallelism. I've been playing with it some time ago - I'll share a link with my work/attempt.

@lordofthejars
Copy link
Member Author

HistoricalChangesFailedTestsSelectionExecutionFunctionalTest.java

It is a bug or a none sense test. Failed strategy does not check historical scm data, so this test can be removed because it is testing exactly the same as the other one.

@lordofthejars
Copy link
Member Author

lordofthejars commented Oct 3, 2017

ignoring the tests is the best solution

As I said is a temporal solution until we decide to remove them

semi-redundant test

In this concrete class of HistoricalChangesAffectedTestsSelectionExecutionFunctionalTest.java I'd delete it because the logic executed in HistoricalChangesAffectedTests.... is exactly the same as ChangesOnDifferentModules... test.

@MatousJobanek
Copy link
Contributor

Check this commit: MatousJobanek@02d9197

I'm combining several things there (the numbers of threads are just example):

  • the test-bed build uses Maven parallelism with 50 threads per cpu core - for more information take a look here

  • the same is used for build invocation on Travis (could be used locally)

  • the Travis is building in three virtual machines at once - check this:

    • one for unit tests
    • one for functional tests - to separate unit tests and functional tests I had to introduce two profiles inside of the pom files
    • one for generating documentation - no to do it in the previous builds/vm twice
  • speeding up Java startup using properties: -XX:+TieredCompilation -XX:TieredStopAtLevel=1

The local build mvn clean install -T 100 now takes 04:28
The build on travis:

Ran for 14 min 41 sec
Total time 18 min 41 sec 

see here: https://travis-ci.org/MatousJobanek/smart-testing/builds/282751554

@MatousJobanek
Copy link
Contributor

I'll send it as a PR if you're fine with it...

@lordofthejars
Copy link
Member Author

lordofthejars commented Oct 3, 2017 via email

@MatousJobanek
Copy link
Contributor

Here it is - as a separated PR: #204
This one is still yours :-)
I went through the tests you ignored and I'm fine with removing the failed one: HistoricalChangesFailedTestsSelectionExecutionFunctionalTest.java
But I would keep the HistoricalChangesAffectedTestsSelectionExecutionFunctionalTest.java as it tests on different granularity than the other one.

@lordofthejars
Copy link
Member Author

lordofthejars commented Oct 3, 2017 via email

@lordofthejars
Copy link
Member Author

@MatousJobanek updated. If you agree we can merge.

@lordofthejars lordofthejars merged commit bf93b94 into arquillian:master Oct 4, 2017
@lordofthejars lordofthejars deleted the issue-126 branch October 4, 2017 07:18
@bartoszmajsak
Copy link
Member

I just wanted to catch up on it - I don't see an approval from Matous and yet you asked him

If you agree we can merge.

Did you guys took it offline or it was just merged?

@lordofthejars
Copy link
Member Author

@bartoszmajsak we talked on mattermost.

@bartoszmajsak
Copy link
Member

How much did we improve the build time after this PR got merged @lordofthejars ?

@MatousJobanek MatousJobanek modified the milestone: 0.0.3 Oct 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build time improvement
3 participants