{"action":"created","comment":{"url":"https://api.github.com/repos/axibase/atsd-api-test/pulls/comments/69525172","id":69525172,"diff_hunk":"@@ -25,11 +26,89 @@ public void testTrimmedMessages() throws Exception {\n         Assert.assertTrue(\"Fail to insert message\", insertMessage(message, 1000));\n \n         MessageQuery messageQuery = new MessageQuery(\"nurswgvml022\", date, endDate);\n-        List<Message> storedMessageList = executeQuery(messageQuery).readEntity(new GenericType<List<Message>>(){});\n+        List<Message> storedMessageList = executeQuery(messageQuery).readEntity(new GenericType<List<Message>>() {\n+        });\n         Message storedMessage = storedMessageList.get(0);\n \n         Assert.assertEquals(\"nurswgvml022\", storedMessage.getEntity());\n         Assert.assertEquals(\"NURSWGVML007 ssh: error: connect_to localhost port 8881: failed.\", storedMessage.getMessage());\n         Assert.assertEquals(\"application\", storedMessage.getType());\n     }\n+\n+    /* #2957 */\n+    @Test\n+    public void testTimeRangeMinSaved() throws Exception {\n+        Message message = new Message(\"e-time-range-msg-1\");\n+        message.setMessage(\"msg-time-range-msg-1\");\n+        message.setDate(\"1970-01-01T00:00:00.000Z\");\n+\n+        Boolean success = insertMessage(message);\n+        Thread.sleep(1000L);\n+\n+        if (!success)\n+            Assert.fail(\"Failed to insert message\");\n+        MessageQuery messageQuery = new MessageQuery(message.getEntity(), Util.getMinDate(), Util.getMaxDate());\n+\n+        List<Message> storedMessageList = executeQuery(messageQuery).readEntity(new GenericType<List<Message>>() {});\n+\n+        Message msgResponse = storedMessageList.get(0);\n+        Assert.assertEquals(\"Incorrect stored date\", message.getDate(), msgResponse.getDate());\n+        Assert.assertEquals(\"Incorrect stored message\", message.getMessage(), msgResponse.getMessage());\n+    }\n+\n+    /* #2957 */\n+    @Test\n+    public void testTimeRangeTimeSaved() throws Exception {\n+        Message message = new Message(\"e-time-range-msg-2\");\n+        message.setMessage(\"msg-time-range-msg-2\");\n+        message.setDate(\"1970-01-01T00:00:00.001Z\");\n+\n+        Boolean success = insertMessage(message);\n+        Thread.sleep(1000L);\n+\n+        if (!success)\n+            Assert.fail(\"Failed to insert message\");\n+        MessageQuery messageQuery = new MessageQuery(message.getEntity(), Util.getMinDate(), Util.getMaxDate());\n+\n+        List<Message> storedMessageList = executeQuery(messageQuery).readEntity(new GenericType<List<Message>>() {});\n+\n+        Message msgResponse = storedMessageList.get(0);\n+        Assert.assertEquals(\"Incorrect stored date\", message.getDate(), msgResponse.getDate());\n+        Assert.assertEquals(\"Incorrect stored message\", message.getMessage(), msgResponse.getMessage());\n+    }\n+\n+    /* #2957 */\n+    @Test\n+    public void testTimeRangeMaxTimeSaved() throws Exception {\n+        Message message = new Message(\"e-time-range-msg-3\");\n+        message.setMessage(\"msg-time-range-msg-3\");\n+        message.setDate(\"2106-02-07T07:28:14.999Z\");\n+\n+        Boolean success = insertMessage(message);\n+        Thread.sleep(1000L);\n+\n+        if (!success)\n+            Assert.fail(\"Failed to insert message\");","path":"src/test/java/com/axibase/tsd/api/method/message/MessageInsertTest.java","position":32,"original_position":74,"commit_id":"ae3b39adbf4b48a13a01f23ad8484a99a895528b","original_commit_id":"ae3b39adbf4b48a13a01f23ad8484a99a895528b","user":{"login":"Sild","id":1629069,"avatar_url":"https://avatars.githubusercontent.com/u/1629069?v=3","gravatar_id":"","url":"https://api.github.com/users/Sild","html_url":"https://github.com/Sild","followers_url":"https://api.github.com/users/Sild/followers","following_url":"https://api.github.com/users/Sild/following{/other_user}","gists_url":"https://api.github.com/users/Sild/gists{/gist_id}","starred_url":"https://api.github.com/users/Sild/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sild/subscriptions","organizations_url":"https://api.github.com/users/Sild/orgs","repos_url":"https://api.github.com/users/Sild/repos","events_url":"https://api.github.com/users/Sild/events{/privacy}","received_events_url":"https://api.github.com/users/Sild/received_events","type":"User","site_admin":false},"body":"assert or exception?","created_at":"2016-07-05T08:37:52Z","updated_at":"2016-07-05T08:37:52Z","html_url":"https://github.com/axibase/atsd-api-test/pull/37#discussion_r69525172","pull_request_url":"https://api.github.com/repos/axibase/atsd-api-test/pulls/37","_links":{"self":{"href":"https://api.github.com/repos/axibase/atsd-api-test/pulls/comments/69525172"},"html":{"href":"https://github.com/axibase/atsd-api-test/pull/37#discussion_r69525172"},"pull_request":{"href":"https://api.github.com/repos/axibase/atsd-api-test/pulls/37"}}},"pull_request":{"url":"https://api.github.com/repos/axibase/atsd-api-test/pulls/37","id":76233166,"html_url":"https://github.com/axibase/atsd-api-test/pull/37","diff_url":"https://github.com/axibase/atsd-api-test/pull/37.diff","patch_url":"https://github.com/axibase/atsd-api-test/pull/37.patch","issue_url":"https://api.github.com/repos/axibase/atsd-api-test/issues/37","number":37,"state":"open","locked":false,"title":"Time range tests for series, messages and properties","user":{"login":"rmakulov","id":2142593,"avatar_url":"https://avatars.githubusercontent.com/u/2142593?v=3","gravatar_id":"","url":"https://api.github.com/users/rmakulov","html_url":"https://github.com/rmakulov","followers_url":"https://api.github.com/users/rmakulov/followers","following_url":"https://api.github.com/users/rmakulov/following{/other_user}","gists_url":"https://api.github.com/users/rmakulov/gists{/gist_id}","starred_url":"https://api.github.com/users/rmakulov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmakulov/subscriptions","organizations_url":"https://api.github.com/users/rmakulov/orgs","repos_url":"https://api.github.com/users/rmakulov/repos","events_url":"https://api.github.com/users/rmakulov/events{/privacy}","received_events_url":"https://api.github.com/users/rmakulov/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-07-05T08:11:24Z","updated_at":"2016-07-05T08:37:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d20025aaf65f2449a7a14aa1a1e76efd0cced478","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/axibase/atsd-api-test/pulls/37/commits","review_comments_url":"https://api.github.com/repos/axibase/atsd-api-test/pulls/37/comments","review_comment_url":"https://api.github.com/repos/axibase/atsd-api-test/pulls/comments{/number}","comments_url":"https://api.github.com/repos/axibase/atsd-api-test/issues/37/comments","statuses_url":"https://api.github.com/repos/axibase/atsd-api-test/statuses/ae3b39adbf4b48a13a01f23ad8484a99a895528b","head":{"label":"axibase:time_range","ref":"time_range","sha":"ae3b39adbf4b48a13a01f23ad8484a99a895528b","user":{"login":"axibase","id":10971416,"avatar_url":"https://avatars.githubusercontent.com/u/10971416?v=3","gravatar_id":"","url":"https://api.github.com/users/axibase","html_url":"https://github.com/axibase","followers_url":"https://api.github.com/users/axibase/followers","following_url":"https://api.github.com/users/axibase/following{/other_user}","gists_url":"https://api.github.com/users/axibase/gists{/gist_id}","starred_url":"https://api.github.com/users/axibase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/axibase/subscriptions","organizations_url":"https://api.github.com/users/axibase/orgs","repos_url":"https://api.github.com/users/axibase/repos","events_url":"https://api.github.com/users/axibase/events{/privacy}","received_events_url":"https://api.github.com/users/axibase/received_events","type":"Organization","site_admin":false},"repo":{"id":60343037,"name":"atsd-api-test","full_name":"axibase/atsd-api-test","owner":{"login":"axibase","id":10971416,"avatar_url":"https://avatars.githubusercontent.com/u/10971416?v=3","gravatar_id":"","url":"https://api.github.com/users/axibase","html_url":"https://github.com/axibase","followers_url":"https://api.github.com/users/axibase/followers","following_url":"https://api.github.com/users/axibase/following{/other_user}","gists_url":"https://api.github.com/users/axibase/gists{/gist_id}","starred_url":"https://api.github.com/users/axibase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/axibase/subscriptions","organizations_url":"https://api.github.com/users/axibase/orgs","repos_url":"https://api.github.com/users/axibase/repos","events_url":"https://api.github.com/users/axibase/events{/privacy}","received_events_url":"https://api.github.com/users/axibase/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/axibase/atsd-api-test","description":"Tests for ATSD api","fork":false,"url":"https://api.github.com/repos/axibase/atsd-api-test","forks_url":"https://api.github.com/repos/axibase/atsd-api-test/forks","keys_url":"https://api.github.com/repos/axibase/atsd-api-test/keys{/key_id}","collaborators_url":"https://api.github.com/repos/axibase/atsd-api-test/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/axibase/atsd-api-test/teams","hooks_url":"https://api.github.com/repos/axibase/atsd-api-test/hooks","issue_events_url":"https://api.github.com/repos/axibase/atsd-api-test/issues/events{/number}","events_url":"https://api.github.com/repos/axibase/atsd-api-test/events","assignees_url":"https://api.github.com/repos/axibase/atsd-api-test/assignees{/user}","branches_url":"https://api.github.com/repos/axibase/atsd-api-test/branches{/branch}","tags_url":"https://api.github.com/repos/axibase/atsd-api-test/tags","blobs_url":"https://api.github.com/repos/axibase/atsd-api-test/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/axibase/atsd-api-test/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/axibase/atsd-api-test/git/refs{/sha}","trees_url":"https://api.github.com/repos/axibase/atsd-api-test/git/trees{/sha}","statuses_url":"https://api.github.com/repos/axibase/atsd-api-test/statuses/{sha}","languages_url":"https://api.github.com/repos/axibase/atsd-api-test/languages","stargazers_url":"https://api.github.com/repos/axibase/atsd-api-test/stargazers","contributors_url":"https://api.github.com/repos/axibase/atsd-api-test/contributors","subscribers_url":"https://api.github.com/repos/axibase/atsd-api-test/subscribers","subscription_url":"https://api.github.com/repos/axibase/atsd-api-test/subscription","commits_url":"https://api.github.com/repos/axibase/atsd-api-test/commits{/sha}","git_commits_url":"https://api.github.com/repos/axibase/atsd-api-test/git/commits{/sha}","comments_url":"https://api.github.com/repos/axibase/atsd-api-test/comments{/number}","issue_comment_url":"https://api.github.com/repos/axibase/atsd-api-test/issues/comments{/number}","contents_url":"https://api.github.com/repos/axibase/atsd-api-test/contents/{+path}","compare_url":"https://api.github.com/repos/axibase/atsd-api-test/compare/{base}...{head}","merges_url":"https://api.github.com/repos/axibase/atsd-api-test/merges","archive_url":"https://api.github.com/repos/axibase/atsd-api-test/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/axibase/atsd-api-test/downloads","issues_url":"https://api.github.com/repos/axibase/atsd-api-test/issues{/number}","pulls_url":"https://api.github.com/repos/axibase/atsd-api-test/pulls{/number}","milestones_url":"https://api.github.com/repos/axibase/atsd-api-test/milestones{/number}","notifications_url":"https://api.github.com/repos/axibase/atsd-api-test/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/axibase/atsd-api-test/labels{/name}","releases_url":"https://api.github.com/repos/axibase/atsd-api-test/releases{/id}","deployments_url":"https://api.github.com/repos/axibase/atsd-api-test/deployments","created_at":"2016-06-03T11:31:43Z","updated_at":"2016-06-22T12:56:00Z","pushed_at":"2016-07-05T08:27:13Z","git_url":"git://github.com/axibase/atsd-api-test.git","ssh_url":"git@github.com:axibase/atsd-api-test.git","clone_url":"https://github.com/axibase/atsd-api-test.git","svn_url":"https://github.com/axibase/atsd-api-test","homepage":null,"size":349,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":2,"default_branch":"master"}},"base":{"label":"axibase:master","ref":"master","sha":"67c5ea946fe085db119d163eff2c7f4ac6a91ca0","user":{"login":"axibase","id":10971416,"avatar_url":"https://avatars.githubusercontent.com/u/10971416?v=3","gravatar_id":"","url":"https://api.github.com/users/axibase","html_url":"https://github.com/axibase","followers_url":"https://api.github.com/users/axibase/followers","following_url":"https://api.github.com/users/axibase/following{/other_user}","gists_url":"https://api.github.com/users/axibase/gists{/gist_id}","starred_url":"https://api.github.com/users/axibase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/axibase/subscriptions","organizations_url":"https://api.github.com/users/axibase/orgs","repos_url":"https://api.github.com/users/axibase/repos","events_url":"https://api.github.com/users/axibase/events{/privacy}","received_events_url":"https://api.github.com/users/axibase/received_events","type":"Organization","site_admin":false},"repo":{"id":60343037,"name":"atsd-api-test","full_name":"axibase/atsd-api-test","owner":{"login":"axibase","id":10971416,"avatar_url":"https://avatars.githubusercontent.com/u/10971416?v=3","gravatar_id":"","url":"https://api.github.com/users/axibase","html_url":"https://github.com/axibase","followers_url":"https://api.github.com/users/axibase/followers","following_url":"https://api.github.com/users/axibase/following{/other_user}","gists_url":"https://api.github.com/users/axibase/gists{/gist_id}","starred_url":"https://api.github.com/users/axibase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/axibase/subscriptions","organizations_url":"https://api.github.com/users/axibase/orgs","repos_url":"https://api.github.com/users/axibase/repos","events_url":"https://api.github.com/users/axibase/events{/privacy}","received_events_url":"https://api.github.com/users/axibase/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/axibase/atsd-api-test","description":"Tests for ATSD api","fork":false,"url":"https://api.github.com/repos/axibase/atsd-api-test","forks_url":"https://api.github.com/repos/axibase/atsd-api-test/forks","keys_url":"https://api.github.com/repos/axibase/atsd-api-test/keys{/key_id}","collaborators_url":"https://api.github.com/repos/axibase/atsd-api-test/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/axibase/atsd-api-test/teams","hooks_url":"https://api.github.com/repos/axibase/atsd-api-test/hooks","issue_events_url":"https://api.github.com/repos/axibase/atsd-api-test/issues/events{/number}","events_url":"https://api.github.com/repos/axibase/atsd-api-test/events","assignees_url":"https://api.github.com/repos/axibase/atsd-api-test/assignees{/user}","branches_url":"https://api.github.com/repos/axibase/atsd-api-test/branches{/branch}","tags_url":"https://api.github.com/repos/axibase/atsd-api-test/tags","blobs_url":"https://api.github.com/repos/axibase/atsd-api-test/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/axibase/atsd-api-test/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/axibase/atsd-api-test/git/refs{/sha}","trees_url":"https://api.github.com/repos/axibase/atsd-api-test/git/trees{/sha}","statuses_url":"https://api.github.com/repos/axibase/atsd-api-test/statuses/{sha}","languages_url":"https://api.github.com/repos/axibase/atsd-api-test/languages","stargazers_url":"https://api.github.com/repos/axibase/atsd-api-test/stargazers","contributors_url":"https://api.github.com/repos/axibase/atsd-api-test/contributors","subscribers_url":"https://api.github.com/repos/axibase/atsd-api-test/subscribers","subscription_url":"https://api.github.com/repos/axibase/atsd-api-test/subscription","commits_url":"https://api.github.com/repos/axibase/atsd-api-test/commits{/sha}","git_commits_url":"https://api.github.com/repos/axibase/atsd-api-test/git/commits{/sha}","comments_url":"https://api.github.com/repos/axibase/atsd-api-test/comments{/number}","issue_comment_url":"https://api.github.com/repos/axibase/atsd-api-test/issues/comments{/number}","contents_url":"https://api.github.com/repos/axibase/atsd-api-test/contents/{+path}","compare_url":"https://api.github.com/repos/axibase/atsd-api-test/compare/{base}...{head}","merges_url":"https://api.github.com/repos/axibase/atsd-api-test/merges","archive_url":"https://api.github.com/repos/axibase/atsd-api-test/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/axibase/atsd-api-test/downloads","issues_url":"https://api.github.com/repos/axibase/atsd-api-test/issues{/number}","pulls_url":"https://api.github.com/repos/axibase/atsd-api-test/pulls{/number}","milestones_url":"https://api.github.com/repos/axibase/atsd-api-test/milestones{/number}","notifications_url":"https://api.github.com/repos/axibase/atsd-api-test/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/axibase/atsd-api-test/labels{/name}","releases_url":"https://api.github.com/repos/axibase/atsd-api-test/releases{/id}","deployments_url":"https://api.github.com/repos/axibase/atsd-api-test/deployments","created_at":"2016-06-03T11:31:43Z","updated_at":"2016-06-22T12:56:00Z","pushed_at":"2016-07-05T08:27:13Z","git_url":"git://github.com/axibase/atsd-api-test.git","ssh_url":"git@github.com:axibase/atsd-api-test.git","clone_url":"https://github.com/axibase/atsd-api-test.git","svn_url":"https://github.com/axibase/atsd-api-test","homepage":null,"size":349,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/axibase/atsd-api-test/pulls/37"},"html":{"href":"https://github.com/axibase/atsd-api-test/pull/37"},"issue":{"href":"https://api.github.com/repos/axibase/atsd-api-test/issues/37"},"comments":{"href":"https://api.github.com/repos/axibase/atsd-api-test/issues/37/comments"},"review_comments":{"href":"https://api.github.com/repos/axibase/atsd-api-test/pulls/37/comments"},"review_comment":{"href":"https://api.github.com/repos/axibase/atsd-api-test/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/axibase/atsd-api-test/pulls/37/commits"},"statuses":{"href":"https://api.github.com/repos/axibase/atsd-api-test/statuses/ae3b39adbf4b48a13a01f23ad8484a99a895528b"}}}}
{"actor":{"display_login":"Sild"}}