@@ -30,7 +30,7 @@ mc.addHandler(function() {
3030 // test nonexistent key is null
3131 exports [ 'test null value' ] = function ( beforeExit ) {
3232 var n = 0 ;
33- mc . get ( 'no such key' , function ( r ) {
33+ mc . get ( 'no such key' , function ( err , r ) {
3434 assert . equal ( null , r ) ;
3535 n ++ ;
3636 } ) ;
@@ -46,7 +46,7 @@ mc.addHandler(function() {
4646 // set key
4747 mc . set ( 'set1' , 'asdf1' , function ( ) {
4848 n ++ ;
49- mc . get ( 'set1' , function ( r ) {
49+ mc . get ( 'set1' , function ( err , r ) {
5050 // assert key is found
5151 assert . equal ( 'asdf1' , r ) ;
5252 n ++ ;
@@ -68,7 +68,7 @@ mc.addHandler(function() {
6868
6969 exports [ 'test set get with integer value' ] = function ( beforeExit ) {
7070 mc . set ( 'testKey' , 123 , function ( ) {
71- mc . get ( 'testKey' , function ( r ) {
71+ mc . get ( 'testKey' , function ( err , r ) {
7272 assert . equal ( 123 , r ) ;
7373 } ) ;
7474 } ) ;
@@ -80,13 +80,13 @@ mc.addHandler(function() {
8080 // set key
8181 mc . set ( 'set2' , 'asdf2' , function ( ) {
8282 n ++ ;
83- mc . get ( 'set2' , function ( r ) {
83+ mc . get ( 'set2' , function ( err , r ) {
8484 // assert key is found
8585 assert . equal ( 'asdf2' , r ) ;
8686 n ++ ;
8787 // delete key
8888 mc . delete ( 'set2' , function ( ) {
89- mc . get ( 'set2' , function ( r ) {
89+ mc . get ( 'set2' , function ( err , r ) {
9090 // assert key is null
9191 assert . equal ( null , r ) ;
9292 n ++ ;
@@ -103,7 +103,7 @@ mc.addHandler(function() {
103103 // test utf8 handling
104104 exports [ 'utf8' ] = function ( beforeExit ) {
105105 mc . set ( 'key1' , 'привет' , function ( ) {
106- mc . get ( 'key1' , function ( r ) {
106+ mc . get ( 'key1' , function ( err , r ) {
107107 assert . equal ( 'привет' , r ) ;
108108 } ) ;
109109 } ) ;
@@ -136,44 +136,44 @@ mc.addHandler(function() {
136136
137137 var n = 0 ;
138138
139- mc . set ( 'inc_bad' , 'HELLO' , function ( response ) {
139+ mc . set ( 'inc_bad' , 'HELLO' , function ( err , response ) {
140140 assert . equal ( response , 'STORED' ) ;
141141 n ++ ;
142- mc . increment ( 'inc_bad' , 2 , function ( ok , err ) {
142+ mc . increment ( 'inc_bad' , 2 , function ( err , ok ) {
143143 n ++ ;
144- assert . equal ( ok , null ) ;
145144 assert . match ( err , / ^ C L I E N T _ E R R O R / ) ;
145+ assert . equal ( ok , null ) ;
146146 } ) ;
147- mc . decrement ( 'inc_bad' , 3 , function ( ok , err ) {
147+ mc . decrement ( 'inc_bad' , 3 , function ( err , ok ) {
148148 n ++ ;
149- assert . equal ( ok , null ) ;
150149 assert . match ( err , / ^ C L I E N T _ E R R O R / ) ;
150+ assert . equal ( ok , null ) ;
151151 } ) ;
152- mc . increment ( 'inc_bad' , null , function ( ok , err ) {
152+ mc . increment ( 'inc_bad' , null , function ( err , ok ) {
153153 n ++ ;
154- assert . equal ( ok , null ) ;
155154 assert . match ( err , / ^ C L I E N T _ E R R O R / ) ;
155+ assert . equal ( ok , null ) ;
156156 } ) ;
157- mc . decrement ( 'inc_bad' , null , function ( ok , err ) {
157+ mc . decrement ( 'inc_bad' , null , function ( err , ok ) {
158158 n ++ ;
159- assert . equal ( ok , null ) ;
160159 assert . match ( err , / ^ C L I E N T _ E R R O R / ) ;
160+ assert . equal ( ok , null ) ;
161161 } ) ;
162162 } ) ;
163163
164- mc . set ( 'inc_good' , '5' , function ( response ) {
164+ mc . set ( 'inc_good' , '5' , function ( err , response ) {
165165 assert . equal ( response , 'STORED' ) ;
166166 n ++ ;
167- mc . increment ( 'inc_good' , 2 , function ( response ) {
167+ mc . increment ( 'inc_good' , 2 , function ( err , response ) {
168168 n ++ ;
169169 assert . equal ( response , 7 ) ;
170- mc . increment ( 'inc_good' , function ( response ) {
170+ mc . increment ( 'inc_good' , function ( err , response ) {
171171 n ++ ;
172172 assert . equal ( response , 8 ) ;
173- mc . decrement ( 'inc_good' , function ( response ) {
173+ mc . decrement ( 'inc_good' , function ( err , response ) {
174174 n ++ ;
175175 assert . equal ( response , 7 ) ;
176- mc . decrement ( 'inc_good' , 4 , function ( response ) {
176+ mc . decrement ( 'inc_good' , 4 , function ( err , response ) {
177177 n ++ ;
178178 assert . equal ( response , 3 ) ;
179179 } ) ;
@@ -191,7 +191,7 @@ mc.addHandler(function() {
191191 exports [ 'version' ] = function ( beforeExit ) {
192192 var n = 0 ;
193193
194- mc . version ( function ( success , error ) {
194+ mc . version ( function ( error , success ) {
195195 n ++ ;
196196 assert . equal ( error , null ) ;
197197 assert . length ( success , 5 ) ;
@@ -205,21 +205,21 @@ mc.addHandler(function() {
205205 exports [ 'stats' ] = function ( beforeExit ) {
206206 var n = 0 ;
207207
208- mc . stats ( function ( success , error ) {
208+ mc . stats ( function ( error , success ) {
209209 n ++ ;
210210 assert . ok ( success . pid , "server has a pid" ) ;
211211 } ) ;
212212
213- mc . stats ( 'settings' , function ( success , error ) {
213+ mc . stats ( 'settings' , function ( error , success ) {
214214 n ++ ;
215215 assert . ok ( success . maxconns ) ;
216216 } ) ;
217217
218- mc . stats ( 'items' , function ( success , error ) { n ++ ; assert . ok ( num_keys ( success ) ) ; } ) ;
219- mc . stats ( 'sizes' , function ( success , error ) { n ++ ; assert . ok ( num_keys ( success ) ) ; } ) ;
220- mc . stats ( 'slabs' , function ( success , error ) { n ++ ; assert . ok ( num_keys ( success ) ) ; } ) ;
218+ mc . stats ( 'items' , function ( error , success ) { n ++ ; assert . ok ( num_keys ( success ) ) ; } ) ;
219+ mc . stats ( 'sizes' , function ( error , success ) { n ++ ; assert . ok ( num_keys ( success ) ) ; } ) ;
220+ mc . stats ( 'slabs' , function ( error , success ) { n ++ ; assert . ok ( num_keys ( success ) ) ; } ) ;
221221
222- mc . stats ( 'notreal' , function ( success , error ) {
222+ mc . stats ( 'notreal' , function ( error , success ) {
223223 n ++ ;
224224 assert . equal ( error , 'ERROR' ) ;
225225 } ) ;
0 commit comments