.NET SDK UpdateMessageAsync for Queue Does Not Accept Timespan Values With Partial Seconds #945
Description
Which service(blob, file, queue, table) does this issue concern?
queue
Which version of the SDK was used?
9.4.2 (.NET CLR 4.0.30319.42000; Win32NT 6.2.9200.0)
What problem was encountered?
UpdateMessageAsync fails with time span values of partial seconds to a InvalidQueryParameterValue exception.
Example SSL log:
UpdateMessage;InvalidQueryParameterValue;400;115;115;authenticated;;;queue;"https://.queue.core.windows.net:443//messages/?popreceipt=%3D&visibilitytimeout=264.6";"///";;0;100.76.248.119:11291;2018-03-28;520;0;187;421;0;;;;;;"Azure-Storage/9.4.2 (.NET CLR 4.0.30319.42000; Win32NT 6.2.9200.0)";;"
How can we reproduce the problem in the simplest way?
queue.UpdateMessage(message, TimeSpan.FromMilliseconds(1500), MessageUpdateFields.Visibility)
Have you found a mitigation/solution?
Yes, call .TotalSeconds on our time span, round it ourselves, and create a new timespan from that value before calling Update.
The REST API the SDK is calling requires int seconds in the query:
http://127.0.0.1:10001/devstoreaccount1/myqueue/messages/messageid?popreceipt=&visibilitytimeout=
UpdateMessageAsync should either take an int param, or do rounding before calling into the backend.