Skip to content

Clarification of return values #51

@jhellan

Description

@jhellan

Hi

Not strictly an issue, but I did not find an answer in the docs. What are the possible return values from 'save_changes'? I was assuming an array, possibly empty, or an exception. But we have the following lines in our code, where spf_vmm_service is an OData::Service instance:

          @spf_vmm_service.AddToVirtualMachines(vmspec)
          vm = @spf_vmm_service.save_changes[0]

but we occasionally see the error

          undefined method `[]' for true:TrueClass (NoMethodError)

from the second line. It looks like save_changes has returned 'true'. Is that possible, and do you have any idea why?

This is isn't easy for us to reproduce right now - it happened just three times during a 60 hr test run which hit this code abt 1100 times.

Do you have any ideas about this?

Jon Kåre Hellan, UNINETT AS, Trondheim, Norway

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions