[CSHARP-115] MapReduce.Duration throws an exception Created: 28/Nov/10  Updated: 02/Apr/15  Resolved: 28/Nov/10

Status: Closed
Project: C# Driver
Component/s: None
Affects Version/s: 0.9
Fix Version/s: 0.9

Type: Bug Priority: Minor - P4
Reporter: Robert Schooley Assignee: Robert Stam
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File CSharpMapReduceTests.cs    

 Description   

I think this is 0.9, I pulled earlier this evening November 28th, 2010.

This is trivial, but I noticed the Duration property is throwing an exception:

MongoDB.DriverOnlineTests.Jira.CSharpMapReduce.CSharpMapReduceTests.MapReduce:
System.InvalidCastException : Unable to cast object of type 'MongoDB.Bson.BsonInt32' to type 'MongoDB.Bson.BsonDouble'.

Attached is an integration test reproducing the issue.

Also, inside of CommandResult there are two properties:

  • ErrorMessage : "Unknown Error"
  • Ok : true

Not sure if those should be that way.



 Comments   
Comment by Robert Stam [ 28/Nov/10 ]

Fixed.

CommandResult.Ok is true because the MapReduce command succeeded. CommandResult.ErrorMessage is not relevant because Ok is true (but I've changed ErrorMessage to return null instead when Ok is true to not be misleading).

Generated at Wed Feb 07 21:35:50 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.