Permalink
Browse files

add more tests

  • Loading branch information...
1 parent 9877cb1 commit 78d884335c5fe5bd7f9bc71992b74918ee6fc264 @tmm1 tmm1 committed Sep 13, 2008
Showing with 23 additions and 7 deletions.
  1. +23 −7 test.rb
View
30 test.rb
@@ -13,20 +13,36 @@ def c.receive_data data
SQL = EventedMysql
def SQL(query, &blk) SQL.select(query, &blk) end
-
- SQL.settings.update :logging => true,
- :database => 'test',
- :connections => 10,
- :timeout => 1
- if false
+ if true
+
+ SQL.settings.update :logging => true,
+ :database => 'test',
+ :connections => 1
+
+ SQL.execute('select 1+2')
+
+ EM.add_timer(1){
+ 3.times do SQL.select('select sleep(0.5)+1'){|r| p(r) } end
+ }
+
+ elsif false
+
+ SQL.settings.update :logging => true,
+ :database => 'test',
+ :connections => 10
EM.add_timer(2.5){ SQL.all('use test') }
else
+ SQL.settings.update :logging => true,
+ :database => 'test',
+ :connections => 10,
+ :timeout => 1
+
n = 0
-
+
SQL.execute('drop table if exists testingabc'){
SQL.execute('create table testingabc (a int, b int, c int)'){
EM.add_periodic_timer(0.2) do

0 comments on commit 78d8843

Please sign in to comment.