{"action":"created","issue":{"url":"https://api.github.com/repos/pgjdbc/pgjdbc/issues/521","repository_url":"https://api.github.com/repos/pgjdbc/pgjdbc","labels_url":"https://api.github.com/repos/pgjdbc/pgjdbc/issues/521/labels{/name}","comments_url":"https://api.github.com/repos/pgjdbc/pgjdbc/issues/521/comments","events_url":"https://api.github.com/repos/pgjdbc/pgjdbc/issues/521/events","html_url":"https://github.com/pgjdbc/pgjdbc/issues/521","id":135320052,"number":521,"title":"Failure when running testUploadBlob_LOOP","user":{"login":"michaelpq","id":985332,"avatar_url":"https://avatars.githubusercontent.com/u/985332?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelpq","html_url":"https://github.com/michaelpq","followers_url":"https://api.github.com/users/michaelpq/followers","following_url":"https://api.github.com/users/michaelpq/following{/other_user}","gists_url":"https://api.github.com/users/michaelpq/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelpq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelpq/subscriptions","organizations_url":"https://api.github.com/users/michaelpq/orgs","repos_url":"https://api.github.com/users/michaelpq/repos","events_url":"https://api.github.com/users/michaelpq/events{/privacy}","received_events_url":"https://api.github.com/users/michaelpq/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-22T05:11:42Z","updated_at":"2016-02-23T00:28:47Z","closed_at":null,"body":"The test infrastructure I work with has bumped into the following errors with testUploadBlob_LOOP when bumping to 9.4.1208 (reproducible from 9.4.1207 btw):\r\n    [junit] java.lang.NullPointerException\r\n    [junit] \tat org.postgresql.test.jdbc2.BlobTest.uploadFile(BlobTest.java:264)\r\n    [junit] \tat org.postgresql.test.jdbc2.BlobTest.testUploadBlob_LOOP(BlobTest.java:137)\r\n    [junit] \r\n    [junit] Testcase: testUploadBlob_NATIVE took 0.022 sec\r\n    [junit] \tCaused an ERROR\r\n    [junit] null\r\n    [junit] java.lang.NullPointerException\r\n    [junit] \tat org.postgresql.test.jdbc2.BlobTest.uploadFile(BlobTest.java:273)\r\n    [junit] \tat org.postgresql.test.jdbc2.BlobTest.testUploadBlob_NATIVE(BlobTest.java:151)\r\n    [junit] \r\n    [junit] Testcase: testGetBytesOffset took 0.022 sec\r\n    [junit] \tCaused an ERROR\r\n    [junit] null\r\n    [junit] java.lang.NullPointerException\r\n    [junit] \tat org.postgresql.test.jdbc2.BlobTest.uploadFile(BlobTest.java:273)\r\n    [junit] \tat org.postgresql.test.jdbc2.BlobTest.testGetBytesOffset(BlobTest.java:160)\r\n    [junit] \r\n    [junit] Testcase: testMultipleStreams took 0.023 sec\r\n    [junit] \tCaused an ERROR\r\n    [junit] null\r\n    [junit] java.lang.NullPointerException\r\n    [junit] \tat org.postgresql.test.jdbc2.BlobTest.uploadFile(BlobTest.java:273)\r\n    [junit] \tat org.postgresql.test.jdbc2.BlobTest.testMultipleStreams(BlobTest.java:177)\r\n    [junit] \r\n    [junit] Testcase: testParallelStreams took 0.026 sec\r\n    [junit] \tCaused an ERROR\r\n    [junit] null\r\n    [junit] java.lang.NullPointerException\r\n    [junit] \tat org.postgresql.test.jdbc2.BlobTest.uploadFile(BlobTest.java:273)\r\n    [junit] \tat org.postgresql.test.jdbc2.BlobTest.testParallelStreams(BlobTest.java:201)\r\n\r\nLooking at the git history, it seems to me that 42c2e3b7 is at fault here. The current code is looking for /test-file.xml to upload from root directory, but we surely don't want that. Here is how this commit has changed things.\r\n\r\n```patch\r\ndiff --git a/pgjdbc/src/test/java/org/postgresql/test/jdbc2/BlobTest.java b/pgjdbc/src/test/java/org/postgresql/test/jdbc2/BlobTest.java\r\nindex 974bd53..ded00a0 100644\r\n--- a/pgjdbc/src/test/java/org/postgresql/test/jdbc2/BlobTest.java\r\n+++ b/pgjdbc/src/test/java/org/postgresql/test/jdbc2/BlobTest.java\r\n@@ -134,7 +134,7 @@ public class BlobTest extends TestCase\r\n      */\r\n     public void testUploadBlob_LOOP() throws Exception\r\n     {\r\n-        assertTrue(uploadFile(\"src/test/resources/test-file.xml\", LOOP) > 0);\r\n+        assertTrue(uploadFile(\"/test-file.xml\", LOOP) > 0);\r\n \r\n         // Now compare the blob & the file. Note this actually tests the\r\n         // InputStream implementation!\r\n```\r\n\r\nIt seems to me that a fix would be to revert those portions.\r\n"},"comment":{"url":"https://api.github.com/repos/pgjdbc/pgjdbc/issues/comments/187451805","html_url":"https://github.com/pgjdbc/pgjdbc/issues/521#issuecomment-187451805","issue_url":"https://api.github.com/repos/pgjdbc/pgjdbc/issues/521","id":187451805,"user":{"login":"michaelpq","id":985332,"avatar_url":"https://avatars.githubusercontent.com/u/985332?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelpq","html_url":"https://github.com/michaelpq","followers_url":"https://api.github.com/users/michaelpq/followers","following_url":"https://api.github.com/users/michaelpq/following{/other_user}","gists_url":"https://api.github.com/users/michaelpq/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelpq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelpq/subscriptions","organizations_url":"https://api.github.com/users/michaelpq/orgs","repos_url":"https://api.github.com/users/michaelpq/repos","events_url":"https://api.github.com/users/michaelpq/events{/privacy}","received_events_url":"https://api.github.com/users/michaelpq/received_events","type":"User","site_admin":false},"created_at":"2016-02-23T00:28:47Z","updated_at":"2016-02-23T00:28:47Z","body":"I haven't tried directly. The only thing I am sure of now is that this fell right on its face where this is run for me, and the only reason I found out was that. The infrastructure where those regression tests are run are using already built jar files, perhaps that's the reason for that. Btw, why having this diff? Isn't uploadFile going to look at a file from root path?"}}