27795 Commits

Author SHA1 Message Date
Gaurav Aradhye
c841d6850e CLOUDSTACK-8579: Fix cleanup operation in few test cases
Signed-off-by: Gaurav Aradhye <gaurav.aradhye@clogeny.com>
This closes #511
2015-06-23 17:36:44 +05:30
wilderrodrigues
f29bf1e85c Add unit tests to cover negative cases
- Cover when the profile is not started/stopped

Signed-off-by: wilderrodrigues <wrodrigues@schubergphilis.com>

This closes #509
2015-06-23 10:03:20 +02:00
wilderrodrigues
78c802a539 Replace System.currentTimeMillis() by System.nanoTime()
- System.nanoTime() is the best way to measure elapsed time in Java.
   - It gives a resolution on the order of microseconds

The System.currentTimeMillis() is used when calculating absolut time.

Signed-off-by: wilderrodrigues <wrodrigues@schubergphilis.com>
2015-06-23 10:03:20 +02:00
Daan Hoogland
c0a1009740 findbugs: (un)boxing of long from string 2015-06-22 13:18:14 +02:00
Rafael da Fonseca
fe4f0b1a58 Specify all dependency versions in pom.xml
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>

This closes #497
2015-06-22 13:01:19 +02:00
Rafael da Fonseca
83488e01af Reduce about 1k String objects from being instantiated
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>
2015-06-22 13:01:19 +02:00
Rafael da Fonseca
9d19191bc6 Root cause of failure is memory abuse in XenTest.java class ;) This should fix it
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>
2015-06-22 13:01:19 +02:00
Rafael da Fonseca
301a7b9a7e Specify all external dependencies in pom Upgrade to lang3 and change usage of deprecated xmlparse method
Add another missing dependency

Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>
2015-06-22 13:01:19 +02:00
Rafael da Fonseca
1603f722c4 Cleanup some lint checker warning in base classes
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>
2015-06-22 13:01:18 +02:00
Rafael da Fonseca
540b163cfc Resolve unsafe cast warnings reported by lint checker Add some debug config to compiler plugin
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>
2015-06-22 13:01:18 +02:00
Rafael da Fonseca
53e42fb45e Fix findbugs SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING warning in Upgrade410to420.java
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>

This closes #505
2015-06-22 10:55:29 +02:00
Rafael da Fonseca
b929db1f1a Fix findbugs DM_BOXED_PRIMITIVE_FOR_PARSING warning in ElastistorPrimaryDataStoreLifeCycle.java
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>

This closes #503
2015-06-22 10:54:55 +02:00
Rafael da Fonseca
a17852aaf4 Fix findbugs DM_BOXED_PRIMITIVE_FOR_PARSING warning in ElastistorUtil.java
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>

This closes #504
2015-06-22 10:54:19 +02:00
Rafael da Fonseca
0d8c64ea56 Fix findbugs DM_BOXED_PRIMITIVE_FOR_PARSING in OvmResourceBase.java
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>

This closes #502
2015-06-22 10:50:48 +02:00
Rafael da Fonseca
dc359c505e Fix findbugs DM_BOXED_PRIMITIVE_FOR_PARSING in BareMetalResourceBase.java
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>

This closes #501
2015-06-22 10:50:12 +02:00
Rafael da Fonseca
58eac0b49d Fix 2 more findbugs DM_BOXED_PRIMITIVE_FOR_PARSING in Upgrade218to22.java
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>

This closes #500
2015-06-22 10:49:35 +02:00
Rafael da Fonseca
f038a740a5 Fix 2 findbugs occurences of DM_BOXED_PRIMITIVE_FOR_PARSING in Upgrade218to22.java
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>

This closes #499
2015-06-22 10:48:49 +02:00
Rafael da Fonseca
dc40f6117b Fix findbugs DM_BOXED_PRIMITIVE_FOR_PARSING warning in DeployVMCmd.java
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>

This closes #498
2015-06-22 10:47:48 +02:00
Rafael da Fonseca
6fd49e49a3 Add apache license header to script
Signed-off-by: Daan Hoogland <daan@onecht.net>

This closes #482
2015-06-21 15:13:27 +02:00
Rafael da Fonseca
4f098a1b90 Check return code on plugin runs
Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-06-21 15:13:27 +02:00
Rafael da Fonseca
b9f5d38772 Improve plugin dependency download Add download for midonet and juniper stuff, this increases runtime for a few minutes, may remove in future if travis show too much overhead
Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-06-21 15:13:27 +02:00
Rafael da Fonseca
0d671b9e54 Some of the plugin dependencies were'nt being properly resolved on the dependency:resolve-plugins mojo This adds a couple more dark magic sprinkles to make sure no dependencies will be downloaded at build time
Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-06-21 15:13:27 +02:00
Rafael da Fonseca
358157f57c Manually add another dependency to be downloaded before build
Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-06-21 15:13:27 +02:00
Rafael da Fonseca
e4f09e9ebc Allow proper retry in pip install command
Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-06-21 15:13:27 +02:00
Rafael da Fonseca
5386e0f6b5 Travis reported another false negative, if paramiko was present but version too low for marvin, nosetests wouldn't run and result would be success
Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-06-21 15:13:26 +02:00
Rafael da Fonseca
f7a8d8e657 Fix erroneous assert expression to get debug from that line
Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-06-21 15:13:26 +02:00
Rafael da Fonseca
f77f4c2f11 xunit-reader.py was returning success in case of exception being thrown during test!
Revert the fix to throw failed test on exception, will fix that in a separate branch so all the other fixes can be committed already and not raise failure on an old intermittent issue that was hidden

Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-06-21 15:13:26 +02:00
Rafael da Fonseca
773e4158b6 Print log data on after_failure.sh
Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-06-21 15:13:26 +02:00
Rafael da Fonseca
348bd2f3cc Use upstart to start mysql and get rid of the warnings
Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-06-21 15:13:26 +02:00
Rafael da Fonseca
e52f3ab932 Add urandom as random source in install.sh
Add urandom as random source in before_script.sh

Remove commented lines in before_script.sh

Remove commented lines in install.sh

Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-06-21 15:13:26 +02:00
Rafael da Fonseca
b95f47c4d4 Remove some more unwanted stuff in install.sh
Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-06-21 15:13:25 +02:00
Rafael da Fonseca
c4a38bdb0d Tomcat download is not doing anything except waste time and disk
Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-06-21 15:13:25 +02:00
Rafael da Fonseca
4047dd571d Can't run travis_wait from script, this just throws an error
Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-06-21 15:13:25 +02:00
Rafael da Fonseca
118f607942 Add some retry and debug to python packages install Sometimes after a full successful run, travis will fail due to not being able to parse tests output
Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-06-21 15:13:25 +02:00
Rafael da Fonseca
9a50e0f03e Fix phase2 deps download for maven 3.2.5 This version didn't like missing <version> tag on artifacts
Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-06-21 15:13:25 +02:00
Rafael da Fonseca
7838bfcc70 Add timeout to nc command, as it was waiting forever and not going through the while loop. This will make sure nc gets restared to retry in case something nasty is happening in the running process
host command not present in build env, switch to getent
second phase of dep download turning some error, print failure log

Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-06-21 15:13:25 +02:00
Rafael da Fonseca
c1c0382bf5 Don't sleep for a fixed amount of time, no use in continuing if repo is unavailable Check if DNS resolution is working properly when failure occurs
Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-06-21 15:13:25 +02:00
Rafael da Fonseca
6a6d64b99a Get some verbosity and debug on after_script.sh to troubleshoot timeouts on this phase Travis is using maven 3.2.5 and this script was setting an alternate maven path before running script Setting CATALINA_BASE and CATALINA_HOME is of no consequence while running jetty, just adds more problems
Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-06-21 15:13:24 +02:00
Rafael da Fonseca
b55ef551ca It seems the network failures last for a bit.. allow some sleeping time Add some verbosity for status checking
Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-06-21 15:13:24 +02:00
Rafael da Fonseca
f0dcd403e7 Second phase wan't running properly due to path issue Add extra echo command to make sure there's data in the pom
Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-06-21 15:13:24 +02:00
Rafael da Fonseca
f0e1c8908b Send output to oblivion because of this message in travis log view: This log is too long to be displayed. Please reduce the verbosity of your build or download the raw log.
Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-06-21 15:13:24 +02:00
Rafael da Fonseca
880f116a62 This is a quick fix to attempt to resolve most of the travis failures Most of the failures have been due to transient network failures, that are causing dependency artifact downloads to fail Maven does not have a way to retry this without restarting the whole build, so the mvn dependency plugin is the best bet Unfortunately, running a dependency:resolve on the project returns yet to be compiled dependencies, and causes it to fail... There is an option to excludeGroupIds and excludeArtifactIds in the docs for this goal, but unfortunately they don't seem to work This drafts a dummy pom in a quick and dirty way, just to download all the deps in one go, while retrying for RETRY_COUNT times if it fails
Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-06-21 15:13:24 +02:00
Daan Hoogland
bbb165a037 findbugs: use preferred encoding explicitly 2015-06-20 10:36:15 +02:00
Daan Hoogland
916a6d0104 findbugs: prepare prepared statements to leverage the advantages of'em
Signed-off-by: Daan Hoogland <daan@onecht.net>

This closes #496
2015-06-20 03:37:20 +02:00
Daan Hoogland
9eff27a080 findbugs: static member should be final
Signed-off-by: Daan Hoogland <daan@onecht.net>

This closes #495
2015-06-20 00:57:59 +02:00
Daan Hoogland
871ba9c521 findbugs: ignored return value should have been returned down stack
Signed-off-by: Daan Hoogland <daan@onecht.net>

This closes #494
2015-06-20 00:57:01 +02:00
Rafael da Fonseca
3efe053952 Test would also throw success if vm was still 'Starting' after 1 minute, this resolves that Reduced for loop to two runs as it will make those many calls to the API if state was Running to start with
Signed-off-by: Daan Hoogland <daan@onecht.net>

This closes #493
2015-06-19 23:40:31 +02:00
Rafael da Fonseca
480cd4693f Allow some time for the SSVM to start before throwing a failure
Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-06-19 23:40:31 +02:00
Daan Hoogland
6e068551d6 findbugs: use a prepared statement as prepared statement
Signed-off-by: Daan Hoogland <daan@onecht.net>

This closes #492
2015-06-19 23:26:00 +02:00
Daan Hoogland
e713ed3b11 findbugs: prepared statements don't make sense if these are not actually prepared
Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-06-19 23:26:00 +02:00