@@ -9,8 +9,6 @@ extern crate uuid;
99extern crate openssl;
1010
1111use serialize:: json;
12- use std:: comm;
13- use std:: sync:: Future ;
1412use time:: Timespec ;
1513use uuid:: Uuid ;
1614use openssl:: ssl:: { SslContext , Sslv3 } ;
@@ -45,7 +43,6 @@ use postgres::error::{PgConnectDbError,
4543use postgres:: types:: { ToSql , FromSql , PgInt4 , PgVarchar } ;
4644use postgres:: types:: array:: { ArrayBase } ;
4745use postgres:: types:: range:: { Range , Inclusive , Exclusive , RangeBound } ;
48- use postgres:: pool:: PostgresConnectionPool ;
4946
5047macro_rules! or_fail(
5148 ( $e: expr) => (
@@ -56,34 +53,8 @@ macro_rules! or_fail(
5653 )
5754)
5855
59- #[ test]
60- // Make sure we can take both connections at once and can still get one after
61- fn test_pool ( ) {
62- let pool = or_fail ! ( PostgresConnectionPool :: new( "postgres://postgres@localhost" ,
63- NoSsl , 2 ) ) ;
64-
65- let ( s1, r1) = comm:: channel ( ) ;
66- let ( s2, r2) = comm:: channel ( ) ;
67-
68- let pool1 = pool. clone ( ) ;
69- let mut fut1 = Future :: spawn ( proc ( ) {
70- let _conn = pool1. get_connection ( ) ;
71- s1. send ( ( ) ) ;
72- r2. recv ( ) ;
73- } ) ;
74-
75- let pool2 = pool. clone ( ) ;
76- let mut fut2 = Future :: spawn ( proc ( ) {
77- let _conn = pool2. get_connection ( ) ;
78- s2. send ( ( ) ) ;
79- r1. recv ( ) ;
80- } ) ;
81-
82- fut1. get ( ) ;
83- fut2. get ( ) ;
84-
85- pool. get_connection ( ) ;
86- }
56+ mod types;
57+ mod pool;
8758
8859#[ test]
8960fn test_non_default_database ( ) {
0 commit comments