{"action":"opened","issue":{"url":"https://api.github.com/repos/Azure/azure-storage-net/issues/104","labels_url":"https://api.github.com/repos/Azure/azure-storage-net/issues/104/labels{/name}","comments_url":"https://api.github.com/repos/Azure/azure-storage-net/issues/104/comments","events_url":"https://api.github.com/repos/Azure/azure-storage-net/issues/104/events","html_url":"https://github.com/Azure/azure-storage-net/issues/104","id":55396075,"number":104,"title":"CloudQueue AddMessage initialVisibilityDelay should not equal timeToLive","user":{"login":"liuhongbo","id":874251,"avatar_url":"https://avatars.githubusercontent.com/u/874251?v=3","gravatar_id":"","url":"https://api.github.com/users/liuhongbo","html_url":"https://github.com/liuhongbo","followers_url":"https://api.github.com/users/liuhongbo/followers","following_url":"https://api.github.com/users/liuhongbo/following{/other_user}","gists_url":"https://api.github.com/users/liuhongbo/gists{/gist_id}","starred_url":"https://api.github.com/users/liuhongbo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liuhongbo/subscriptions","organizations_url":"https://api.github.com/users/liuhongbo/orgs","repos_url":"https://api.github.com/users/liuhongbo/repos","events_url":"https://api.github.com/users/liuhongbo/events{/privacy}","received_events_url":"https://api.github.com/users/liuhongbo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-25T04:06:42Z","updated_at":"2015-01-25T04:06:42Z","closed_at":null,"body":"If you pass initialVisibilityDelay and timeToLive the same value, the service will return with a 400 bad request response\r\n\r\nHowever, in the AddMessageImpl\r\n\r\n           if (initialVisibilityDelay.HasValue)\r\n            {\r\n                CommonUtility.AssertInBounds(\"initialVisibilityDelay\", initialVisibilityDelay.Value, TimeSpan.Zero, timeToLive ?? CloudQueueMessage.MaxTimeToLive);\r\n                initialVisibilityDelayInSeconds = (int)initialVisibilityDelay.Value.TotalSeconds;\r\n            }\r\n\r\nthe check will pass.  I think it should be like something this:\r\n\r\n            if (initialVisibilityDelay.HasValue)\r\n            {\r\n                CommonUtility.AssertInBounds(\"initialVisibilityDelay\", initialVisibilityDelay.Value, TimeSpan.Zero, timeToLive.HasValue ? timeToLive.Value.Subtract(TimeSpan.FromMilliseconds(1)) : CloudQueueMessage.MaxTimeToLive.Subtract(TimeSpan.FromMilliseconds(1)));\r\n                initialVisibilityDelayInSeconds = (int)initialVisibilityDelay.Value.TotalSeconds;\r\n            }\r\n\r\n           Or write another utility method to check it without equal the upper bound value."}}