@@ -15,10 +15,7 @@ fn hnsw_test() {
1515 assert_eq ! ( index. max_layer, 0 ) ;
1616 assert_eq ! ( index. enterpoint, None ) ;
1717
18- let mock_fn = |_s : String , _n : Node < f32 > | {
19- let ten_millis = time:: Duration :: from_millis ( 10 ) ;
20- thread:: sleep ( ten_millis) ;
21- } ;
18+ let mock_fn = |_s : String , _n : Node < f32 > | { } ;
2219
2320 // add node
2421 for i in 0 ..100 {
@@ -27,8 +24,8 @@ fn hnsw_test() {
2724 index. add_node ( & name, & data, mock_fn) . unwrap ( ) ;
2825 }
2926 // sleep for a brief period to make sure all threads are done
30- let hundred_millis = time:: Duration :: from_millis ( 100 ) ;
31- thread:: sleep ( hundred_millis ) ;
27+ let ten_millis = time:: Duration :: from_millis ( 10 ) ;
28+ thread:: sleep ( ten_millis ) ;
3229 for i in 0 ..100 {
3330 let node_name = format ! ( "node{}" , i) ;
3431 let node = index. nodes . get ( & node_name) . unwrap ( ) ;
@@ -70,8 +67,8 @@ fn hnsw_test() {
7067 }
7168 }
7269 // sleep for a brief period to make sure all threads are done
73- let hundred_millis = time:: Duration :: from_millis ( 10 ) ;
74- thread:: sleep ( hundred_millis ) ;
70+ let ten_millis = time:: Duration :: from_millis ( 10 ) ;
71+ thread:: sleep ( ten_millis ) ;
7572 let sc = Arc :: strong_count ( & node. 0 ) ;
7673 if sc > 1 {
7774 println ! ( "Delete {:?}" , node) ;
0 commit comments