Skip to content

fix(#126): Improves build time#203

Merged
lordofthejars merged 2 commits intoarquillian:masterfrom
lordofthejars:issue-126
Oct 4, 2017
Merged

fix(#126): Improves build time#203
lordofthejars merged 2 commits intoarquillian:masterfrom
lordofthejars:issue-126

Conversation

@lordofthejars
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member Author

lordofthejars commented Oct 2, 2017 via email

@lordofthejars
Copy link
Copy Markdown
Member Author

@MatousJobanek
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor

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

@lordofthejars
Copy link
Copy Markdown
Member Author

lordofthejars commented Oct 3, 2017 via email

@MatousJobanek
Copy link
Copy Markdown
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
Copy Markdown
Member Author

lordofthejars commented Oct 3, 2017 via email

@lordofthejars
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member Author

@bartoszmajsak we talked on mattermost.

@bartoszmajsak
Copy link
Copy Markdown
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