cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Charles Moulliard <ch0...@gmail.com>
Subject Re: Build issue - Test
Date Sat, 03 Nov 2012 16:29:02 GMT
Database connection is there. I think that doc should be improved to
explain for 4.1.0 what should be configured and installed prior to start
maven build


On Fri, Nov 2, 2012 at 6:59 PM, Chiradeep Vittal <
Chiradeep.Vittal@citrix.com> wrote:

> Agreed, but a lot of unit tests assume a database connection
> We can fix those tests to use
> @Before
>  public void beforeMethod() {
>   org.junit.Assume.assumeThat(DbIsConnected);
>      // rest of setup.
>  }
>
>
>
> On 11/2/12 10:13 AM, "Charles Moulliard" <ch007m@gmail.com> wrote:
>
> >unit test should work.
> >
> >
> >On Fri, Nov 2, 2012 at 6:04 PM, Chiradeep Vittal <
> >Chiradeep.Vittal@citrix.com> wrote:
> >
> >> Try to run it with DskipTests=true
> >>
> >> On 11/2/12 6:59 AM, "Charles Moulliard" <ch007m@gmail.com> wrote:
> >>
> >> >Hi,
> >> >
> >> >During maven build of cloudstack project (last git pull), I get this
> >> >error :
> >> >
> >> >2012-11-02 14:48:14,269 ERROR
> >>[network.security.SecurityGroupManagerImpl]
> >> >(main:) Problem during SG work
> >>
> >>>com.cloud.network.security.LocalSecurityGroupWorkQueue$LocalSecurityGrou
> >>>pW
> >> >ork@44c
> >> >com.cloud.utils.exception.CloudRuntimeException: DB Exception on:
> >> >com.mysql.jdbc.JDBC4PreparedStatement@67a1f370: SELECT
> >> >op_vm_ruleset_log.id,
> >> >op_vm_ruleset_log.instance_id, op_vm_ruleset_log.created,
> >> >op_vm_ruleset_log.logsequence FROM op_vm_ruleset_log WHERE
> >> >op_vm_ruleset_log.instance_id = 1100  ORDER BY RAND() LIMIT 1
> >> > at
> >>
> >>>com.cloud.utils.db.GenericDaoBase.searchIncludingRemoved(GenericDaoBase.
> >>>ja
> >> >va:409)
> >> >at
> >>com.cloud.utils.db.DatabaseCallback.intercept(DatabaseCallback.java:34)
> >> > at
> >>
> >>>com.cloud.utils.db.GenericDaoBase.searchIncludingRemoved(GenericDaoBase.
> >>>ja
> >> >va:344)
> >> >at
> >>com.cloud.utils.db.DatabaseCallback.intercept(DatabaseCallback.java:34)
> >> > at
> >>
> >>>com.cloud.utils.db.GenericDaoBase.findOneIncludingRemovedBy(GenericDaoBa
> >>>se
> >> >.java:854)
> >> >at
> >>
> >>>com.cloud.network.security.dao.VmRulesetLogDaoImpl.findByVmId(VmRulesetL
> >>>og
> >> >DaoImpl.java:77)
> >> > at
> >> >com.cloud.utils.db.DatabaseCallback.intercept(DatabaseCallback.java:34)
> >> >at
> >>
> >>>com.cloud.network.security.SecurityGroupManagerImpl2.work(SecurityGroupM
> >>>an
> >> >agerImpl2.java:139)
> >> > at
> >>
> >>>com.cloud.network.security.SecurityGroupManagerImpl2Test.testWork(Securi
> >>>ty
> >> >GroupManagerImpl2Test.java:118)
> >> >at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >> > at
> >>
> >>>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
> >>>a:
> >> >39)
> >> >at
> >>
> >>>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
> >>>Im
> >> >pl.java:25)
> >> > at java.lang.reflect.Method.invoke(Method.java:597)
> >> >at junit.framework.TestCase.runTest(TestCase.java:168)
> >> > at junit.framework.TestCase.runBare(TestCase.java:134)
> >> >at junit.framework.TestResult$1.protect(TestResult.java:110)
> >> > at junit.framework.TestResult.runProtected(TestResult.java:128)
> >> >at junit.framework.TestResult.run(TestResult.java:113)
> >> > at junit.framework.TestCase.run(TestCase.java:124)
> >> >at junit.framework.TestSuite.runTest(TestSuite.java:243)
> >> > at junit.framework.TestSuite.run(TestSuite.java:238)
> >> >at
> >>
> >>>org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.jav
> >>>a:
> >> >83)
> >> > at
> >>
> >>>org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.j
> >>>av
> >> >a:236)
> >> >at
> >>
> >>>org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Pro
> >>>vi
> >> >der.java:134)
> >> > at
> >>
> >>>org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.ja
> >>>va
> >> >:113)
> >> >at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >> > at
> >>
> >>>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
> >>>a:
> >> >39)
> >> >at
> >>
> >>>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
> >>>Im
> >> >pl.java:25)
> >> > at java.lang.reflect.Method.invoke(Method.java:597)
> >> >at
> >>
> >>>org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(Ref
> >>>le
> >> >ctionUtils.java:189)
> >> > at
> >>
> >>>org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(Pr
> >>>ov
> >> >iderFactory.java:165)
> >> >at
> >>
> >>>org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(Provider
> >>>Fa
> >> >ctory.java:85)
> >> > at
> >>
> >>>org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedB
> >>>oo
> >> >ter.java:103)
> >> >at
> >>
> >>>org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:74)
> >> >Caused by:
> >> >at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> >>Method)
> >> >at
> >>
> >>>sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorA
> >>>cc
> >> >essorImpl.java:39)
> >> > at
> >>
> >>>sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCons
> >>>tr
> >> >uctorAccessorImpl.java:27)
> >> >at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
> >> > at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)
> >> >at com.mysql.jdbc.Util.getInstance(Util.java:384)
> >> > at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1054)
> >> >at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3562)
> >> > at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3494)
> >> >at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1960)
> >> > at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2114)
> >> >at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2696)
> >> > at
> >>
> >>>com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:
> >>>21
> >> >05)
> >> >at
> >>
> >>>com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:226
> >>>4)
> >> > at
> >>
> >>>org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(Delegat
> >>>in
> >> >gPreparedStatement.java:96)
> >> >at
> >>
> >>>org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(Delegat
> >>>in
> >> >gPreparedStatement.java:96)
> >> > at
> >>
> >>>com.cloud.utils.db.GenericDaoBase.searchIncludingRemoved(GenericDaoBase.
> >>>ja
> >> >va:403)
> >> >
> >> >Do we have to run a script to initialize the DB ?
> >> >
> >> >Regards,
> >> >
> >> >--
> >> >Charles Moulliard
> >> >Apache Committer / Sr. Enterprise Architect (RedHat)
> >> >Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >--
> >> >Charles Moulliard
> >> >Apache Committer / Sr. Enterprise Architect (RedHat)
> >> >Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com
> >>
> >>
> >
> >
> >--
> >Charles Moulliard
> >Apache Committer / Sr. Enterprise Architect (RedHat)
> >Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com
>
>


-- 
Charles Moulliard
Apache Committer / Sr. Enterprise Architect (RedHat)
Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message