Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for getNewContext (0.09 sec)

  1. src/test/java/jcifs/tests/TimeoutTest.java

        public void testTimeoutOpenFile () throws IOException, InterruptedException {
            // use separate context here as the settings stick to the transport
            CIFSContext ctx = lowTimeout(withTestNTLMCredentials(getNewContext()));
            try ( SmbFile f = new SmbFile(new SmbFile(getTestShareURL(), ctx), makeRandomName()) ) {
                int soTimeout = ctx.getConfig().getSoTimeout();
                f.createNewFile();
                try {
    Registered: Sun Nov 03 00:10:13 UTC 2024
    - Last Modified: Sun Jul 01 13:12:10 UTC 2018
    - 12.4K bytes
    - Viewed (0)
  2. src/test/java/jcifs/tests/BaseCIFSTest.java

            System.gc();
            System.runFinalization();
        }
    
    
        protected CIFSContext getContext () {
            return this.context;
        }
    
    
        protected CIFSContext getNewContext () throws CIFSException {
            Properties props = new Properties();
            props.putAll(this.properties);
            return new BaseContext(new PropertyConfiguration(props));
        }
    
    
    Registered: Sun Nov 03 00:10:13 UTC 2024
    - Last Modified: Sun Jul 01 13:12:10 UTC 2018
    - 8.1K bytes
    - Viewed (0)
  3. src/test/java/jcifs/tests/SessionTest.java

                    assertEquals(before, t.getInflightRequests());
                }
            }
        }
    
    
        @Test
        public void testAuthErrorNoConnLeak () throws Exception {
            CIFSContext cifsContext = getNewContext().withCredentials(new NtlmPasswordAuthenticator("wrong", "wrong", "wrong"));
            try ( SmbFile f = new SmbFile("smb://" + getTestServer() + "/IPC$/test", cifsContext); ) {
                f.connect();
    Registered: Sun Nov 03 00:10:13 UTC 2024
    - Last Modified: Thu Jan 05 13:09:03 UTC 2023
    - 15.8K bytes
    - Viewed (0)
  4. src/test/java/jcifs/tests/EnumTest.java

                  SmbFile f = new SmbFile(r, "x-test/") ) {
                if ( !f.exists() ) {
                    f.mkdirs();
                }
            }
    
            // fresh connection
            CIFSContext ctx = getNewContext();
            try ( SmbFile r = new SmbFile(getTestShareURL(), withTestNTLMCredentials(ctx));
                  SmbFile f = new SmbFile(r, "x-test/") ) {
    
                Set<String> names = new HashSet<>();
    Registered: Sun Nov 03 00:10:13 UTC 2024
    - Last Modified: Thu Jan 05 13:09:03 UTC 2023
    - 25.5K bytes
    - Viewed (0)
Back to top