File: TortureTest5.java

package info (click to toggle)
jcifs 1.3.17-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,860 kB
  • ctags: 3,997
  • sloc: java: 23,131; xml: 3,672; ansic: 386; sh: 171; makefile: 27
file content (36 lines) | stat: -rw-r--r-- 927 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import jcifs.UniAddress;
import java.util.Enumeration;

public class TortureTest5 extends Thread {

    String name;

    TortureTest5( String name ) {
        this.name = name;
    }

    public void run() {
        try {
            System.out.println( UniAddress.getByName( name ));
        } catch( Exception e ) {
            e.printStackTrace();
        }
    }

    public static void main( String[] argv ) throws Exception {
    //  jcifs.util.Config.setProperty( "retryCount", "1" );
    //  jcifs.util.Config.setProperty( "soTimeout", "1000" );

        Thread[] threads = new Thread[30];
        for( int i = 0; i < argv.length; i++ ) {
            threads[i] = new TortureTest5( argv[i] );
        }
        for( int t = 0; t < argv.length; t++ ) {
            threads[t].start();
        }
        for( int j = 0; j < argv.length; j++ ) {
            threads[j].join();
        }
        System.exit( 0 );
    }
}