|
4 | 4 | import com.google.common.base.Optional; |
5 | 5 | import com.google.common.collect.Lists; |
6 | 6 | import com.google.common.io.Resources; |
7 | | -import org.apache.commons.vfs2.FileSystemException; |
8 | 7 | import org.apache.sshd.common.NamedFactory; |
9 | 8 | import org.apache.sshd.common.file.virtualfs.VirtualFileSystemFactory; |
10 | 9 | import org.apache.sshd.server.Command; |
|
30 | 29 | import org.embulk.spi.Schema; |
31 | 30 | import org.embulk.spi.TransactionalPageOutput; |
32 | 31 | import org.embulk.spi.time.Timestamp; |
33 | | -import org.hamcrest.CoreMatchers; |
34 | 32 | import org.junit.After; |
35 | 33 | import org.junit.Before; |
36 | 34 | import org.junit.Rule; |
@@ -474,42 +472,6 @@ public void testUserSecretKeyFileWithProxy() |
474 | 472 | } |
475 | 473 | } |
476 | 474 |
|
477 | | - @Test |
478 | | - public void testTimeout() |
479 | | - { |
480 | | - // setting embulk config |
481 | | - final String pathPrefix = "/test/testUserPassword"; |
482 | | - String configYaml = "" + |
483 | | - "type: sftp\n" + |
484 | | - "host: " + HOST + "\n" + |
485 | | - "port: " + PORT + "\n" + |
486 | | - "user: " + USERNAME + "\n" + |
487 | | - "secret_key_file: " + SECRET_KEY_FILE + "\n" + |
488 | | - "secret_key_passphrase: " + SECRET_KEY_PASSPHRASE + "\n" + |
489 | | - "path_prefix: " + testFolder.getRoot().getAbsolutePath() + pathPrefix + "\n" + |
490 | | - "timeout: 1\n" + |
491 | | - "file_ext: txt\n" + |
492 | | - "formatter:\n" + |
493 | | - " type: csv\n" + |
494 | | - " newline: CRLF\n" + |
495 | | - " newline_in_field: LF\n" + |
496 | | - " header_line: true\n" + |
497 | | - " charset: UTF-8\n" + |
498 | | - " quote_policy: NONE\n" + |
499 | | - " quote: \"\\\"\"\n" + |
500 | | - " escape: \"\\\\\"\n" + |
501 | | - " null_string: \"\"\n" + |
502 | | - " default_timezone: 'UTC'"; |
503 | | - |
504 | | - // exception |
505 | | - exception.expect(RuntimeException.class); |
506 | | - exception.expectCause(CoreMatchers.<Throwable>instanceOf(FileSystemException.class)); |
507 | | - exception.expectMessage("Could not connect to SFTP server"); |
508 | | - |
509 | | - // runner.transaction -> ... |
510 | | - run(configYaml, Optional.of(60)); // sleep 1 minute while processing |
511 | | - } |
512 | | - |
513 | 475 | @Test |
514 | 476 | public void testProxyType() |
515 | 477 | { |
|
0 commit comments