Really long MappersSpecsAsTest

2 views
Skip to first unread message

Jorge Ortiz

unread,
Jun 14, 2008, 6:03:18 PM6/14/08
to lif...@googlegroups.com
Anyone know why this takes so long on my machine? Do other people
experience this as well?

Running net.liftweb.mapper.MapperSpecsAsTest
Tests run: 7, Failures: 0, Errors: 0, Skipped: 2, Time elapsed: 231.999 sec

--j

David Pollak

unread,
Jun 14, 2008, 6:58:31 PM6/14/08
to lif...@googlegroups.com

Weird:

Running net.liftweb.mapper.MapperSpecsAsTest
Tests run: 7, Failures: 0, Errors: 0, Skipped: 2, Time elapsed: 6.865 sec

> --j
>
> >
>

Daniel Green

unread,
Jun 14, 2008, 8:11:05 PM6/14/08
to lif...@googlegroups.com

Stats?

etorreborre

unread,
Jun 15, 2008, 11:35:00 PM6/15/08
to liftweb
Hi Jorge,

Maybe you can run the same thing in the console and have a look at the
exception which triggers the skipping of the test. It should help you
find the DB provider taking more time than the other ones and maybe
understand why that one takes longer to fail. Here is the full output
for me:

Specification "MapperSpecs"
Mapper for MySql should
o schemify
Server connection failure during transaction. Due to underlying
exception: 'java.net.SocketException: java.net.ConnectException:
Connection refused: connect'.

** BEGIN NESTED EXCEPTION **

java.net.SocketException
MESSAGE: java.net.ConnectException: Connection refused: connect

STACKTRACE:

java.net.SocketException: java.net.ConnectException: Connection
refused: connect
at
com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:
156)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:276)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2815)
at com.mysql.jdbc.Connection.<init>(Connection.java:1531)
at
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:
266)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at net.liftweb.mapper.DBProviders$MySqlProvider$$anon
$1.mkConn(DBProviders.scala:111)
at net.liftweb.mapper.DBProviders
$Vendor.newConnection(DBProviders.scala:93)
at net.liftweb.mapper.DB$$anonfun$2.apply(DB.scala:70)
at net.liftweb.mapper.DB$$anonfun$2.apply(DB.scala:70)
at net.liftweb.util.Full.flatMap(Can.scala:266)
at net.liftweb.mapper.DB$.newConnection(DB.scala:70)
at net.liftweb.mapper.DB$.getConnection(DB.scala:87)
at net.liftweb.mapper.DB$.use(DB.scala:241)
at net.liftweb.mapper.DBProviders$DbSetup$class.deleteAllTables
$1(DBProviders.scala:60)
at net.liftweb.mapper.DBProviders$DbSetup
$class.setupDB(DBProviders.scala:86)
at net.liftweb.mapper.DBProviders$MySqlProvider
$.setupDB(DBProviders.scala:108)
at net.liftweb.mapper.MapperSpecs$$anonfun$1$$anonfun$apply$1$
$anonfun$apply$2.apply(MapperSpecs.scala:35)
at net.liftweb.mapper.MapperSpecs$$anonfun$1$$anonfun$apply$1$
$anonfun$apply$2.apply(MapperSpecs.scala:34)
at org.specs.specification.ExampleLifeCycle
$class.executeTest(SpecificationStructure.scala:148)
at org.specs.Specification.executeTest(Specification.scala:25)
at org.specs.specification.Sut.executeTest(Sut.scala:102)
at org.specs.specification.Example$$anonfun$2.apply(Example.scala:
84)
at org.specs.specification.Example$$anonfun$2.apply(Example.scala:
71)
at org.specs.specification.Example$$anonfun$in
$1.apply(Example.scala:99)
at org.specs.specification.Example$$anonfun$in
$1.apply(Example.scala:98)
at org.specs.specification.Example.execute(Example.scala:110)
at org.specs.specification.Example.errors(Example.scala:134)
at org.specs.runner.OutputReporter$class.status$1(Reporter.scala:
156)
at org.specs.runner.OutputReporter
$class.reportExample(Reporter.scala:164)
at org.specs.runner.ConsoleRunner.reportExample(Runner.scala:67)
at org.specs.runner.OutputReporter$$anonfun$reportExamples
$1.apply(Reporter.scala:146)
at org.specs.runner.OutputReporter$$anonfun$reportExamples
$1.apply(Reporter.scala:145)
at scala.Iterator$class.foreach(Iterator.scala:395)
at scala.collection.mutable.SingleLinkedList$$anon
$1.foreach(SingleLinkedList.scala:50)
at scala.Iterable$class.foreach(Iterable.scala:256)
at scala.collection.mutable.Queue.foreach(Queue.scala:24)
at org.specs.runner.OutputReporter
$class.reportExamples(Reporter.scala:145)
at org.specs.runner.ConsoleRunner.reportExamples(Runner.scala:67)
at org.specs.runner.OutputReporter$class.printSut(Reporter.scala:
113)
at org.specs.runner.ConsoleRunner.printSut(Runner.scala:67)
at org.specs.runner.OutputReporter$class.reportSut(Reporter.scala:
105)
at org.specs.runner.ConsoleRunner.reportSut(Runner.scala:67)
at org.specs.runner.OutputReporter$$anonfun$reportSuts
$1.apply(Reporter.scala:97)
at org.specs.runner.OutputReporter$$anonfun$reportSuts
$1.apply(Reporter.scala:97)
at scala.List.foreach(List.scala:827)
at org.specs.runner.OutputReporter
$class.reportSuts(Reporter.scala:97)
at org.specs.runner.ConsoleRunner.reportSuts(Runner.scala:67)
at org.specs.runner.OutputReporter
$class.reportSpec(Reporter.scala:54)
at org.specs.runner.ConsoleRunner.reportSpec(Runner.scala:67)
at org.specs.runner.OutputReporter$$anonfun$report
$1.apply(Reporter.scala:34)
at org.specs.runner.OutputReporter$$anonfun$report
$1.apply(Reporter.scala:34)
at scala.Iterator$class.foreach(Iterator.scala:395)
at scala.runtime.BoxedArray$$anon$2.foreach(BoxedArray.scala:45)
at scala.Iterable$class.foreach(Iterable.scala:256)
at scala.runtime.BoxedArray.foreach(BoxedArray.scala:24)
at org.specs.runner.OutputReporter$class.report(Reporter.scala:
34)
at org.specs.runner.ConsoleRunner.report(Runner.scala:67)
at org.specs.runner.Console$class.reportSpecs(Runner.scala:54)
at org.specs.runner.ConsoleRunner.reportSpecs(Runner.scala:67)
at org.specs.runner.Console$class.main(Runner.scala:58)
at org.specs.runner.ConsoleRunner.main(Runner.scala:67)
at org.specs.Specification.main(Specification.scala:33)
at net.liftweb.mapper.MapperSpecs.main(MapperSpecs.scala)


** END NESTED EXCEPTION **


Attempted reconnect 3 times. Giving up. (MapperSpecs.scala:35)

Total for SUT "Mapper for MySql":
Finished in 7 seconds, 641 ms
1 example (1 skipped), 0 assertion, 0 failure, 0 error

Mapper for Derby should
+ schemify

Total for SUT "Mapper for Derby":
Finished in 14 seconds, 969 ms
1 example, 4 assertions, 0 failure, 0 error

Mapper for PostgreSql should
o schemify
Connection refused. Check that the hostname and port are correct
and that the postmaster is accepting TCP/IP connections.
(MapperSpecs.scala:35)

Total for SUT "Mapper for PostgreSql":
Finished in 15 seconds, 922 ms
1 example (1 skipped), 0 assertion, 0 failure, 0 error

Mapper for H2 should
+ schemify

Total for SUT "Mapper for H2":
Finished in 16 seconds, 782 ms
1 example, 4 assertions, 0 failure, 0 error

Mapper for H2 in memory should
+ schemify

Total for SUT "Mapper for H2 in memory":
Finished in 16 seconds, 813 ms
1 example, 4 assertions, 0 failure, 0 error

Total for specification "MapperSpecs":
Finished in 16 seconds, 813 ms
5 examples (2 skipped), 12 assertions, 0 failure, 0 error

Eric.

etorreborre

unread,
Jun 16, 2008, 2:10:05 AM6/16/08
to liftweb
BTW, I realized that the time reporting in the console wasn't correct
since the timer wasn't restarted for each system-under-test. I fixed
this in the latest SNAPSHOT version of specs. And I hopefully intend
to resume work on lift tests and specs these days so I will update
specs version as well.

Eric.

Jorge Ortiz

unread,
Jun 18, 2008, 2:56:22 AM6/18/08
to lif...@googlegroups.com
Duh, my bad...

"Server connection failure during transaction. Due to underlying
exception: 'java.net.SocketException: java.net.ConnectException:

Operation timed out'."

I forgot I don't have mysql installed on this machine.

Sorry for the fuss.

Maybe there should be a way for tests with outside dependencies (like
mysql) to fail gracefully?

--j

etorreborre

unread,
Jun 18, 2008, 3:36:25 AM6/18/08
to liftweb
Maybe DavidB can help us here?

The purpose of the test is indeed to fail gracefully. In case of an
initialization issue, the test is skipped. Yet, it takes an awful
amount of time in your case to determine that the test couldn't be
run. I don't know how we can make that better with MySql.

Eric.
Reply all
Reply to author
Forward
0 new messages