/[cwmp]/google/t/30-server.t
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /google/t/30-server.t

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 83 by dpavlin, Fri Jun 22 13:09:08 2007 UTC revision 84 by dpavlin, Fri Jun 22 18:25:24 2007 UTC
# Line 24  eval { Line 24  eval {
24  ok(my $abs_path = abs_path($0), "abs_path");  ok(my $abs_path = abs_path($0), "abs_path");
25  $abs_path =~ s!/[^/]*$!/!;      #!fix-vim  $abs_path =~ s!/[^/]*$!/!;      #!fix-vim
26    
27    my $store_path = "$abs_path/var/state.db";
28    unlink $store_path if -e $store_path;
29    
30  ok( my $server = CWMP::Server->new({  ok( my $server = CWMP::Server->new({
31          debug => $debug,          debug => $debug,
32          port => $port,          port => $port,
33          store_path => "$abs_path/var/state.db",          store_path => $store_path,
34  }), 'new' );  }), 'new' );
35  isa_ok( $server, 'CWMP::Server' );  isa_ok( $server, 'CWMP::Server' );
36    
# Line 44  if ( $pid = fork ) { Line 47  if ( $pid = fork ) {
47          die "can't fork";          die "can't fork";
48  }  }
49    
50    sleep 1;        # so server can start
51    
52  ok( my $s = Net::HTTP->new(Host => "localhost:$port"), 'client' );  ok( my $s = Net::HTTP->new(Host => "localhost:$port"), 'client' );
53  $s->keep_alive( 1 );  $s->keep_alive( 1 );
54    
# Line 144  InternetGatewayDevice.DeviceInfo.SpecVer Line 149  InternetGatewayDevice.DeviceInfo.SpecVer
149  }  }
150  ok( $s->write_chunk_eof, 'write_chunk_eof' );  ok( $s->write_chunk_eof, 'write_chunk_eof' );
151    
152  ok( kill(1,$pid), 'kill ' . $pid );  sleep 1;
153    
154    ok( kill(9,$pid), 'kill ' . $pid );
155    
156  ok( waitpid($pid,0), 'waitpid' );  ok( waitpid($pid,0), 'waitpid' );

Legend:
Removed from v.83  
changed lines
  Added in v.84

  ViewVC Help
Powered by ViewVC 1.1.26