Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove checking for missing method calls inside a session.

The exception that we were capturing within a session block
can be caused by more than just a missing method call on a VBox object.
This handling of the exception was hiding more important exception
causes making development difficult.
  • Loading branch information...
commit e74cf6197828e5065d7f69d33e82de70f9df3566 1 parent 38ddaa6
@tbatchelli tbatchelli authored
9 src/vmfest/virtualbox/session.clj
@@ -144,15 +144,6 @@ with a virtualbox.
(let [~vb-m (.getMachine ~session)]
- (catch java.lang.IllegalArgumentException e#
- (conditions/log-and-raise
- e#
- {:log-level :error
- :message
- (format
- "Called a method that is not available with a direct session in '%s'"
- '~body)
- :type :invalid-method}))
(finally (.unlockMachine ~session))))))
(catch VBoxException e#
11 test/vmfest/virtualbox/session_test.clj
@@ -74,16 +74,7 @@
(with-session valid-machine :write [s2 m2]))))))
(testing "a session with a bogus machine will throw a condition"
(is (thrown-with-msg? Condition #"Cannot open session with machine"
- (with-session bogus-machine :write [s m]))))
- (testing "write session method call -- wrong method,"
- (is (thrown?
- Condition
- (with-session valid-machine :write [session machine]
- (.setBogusVariable machine nil))))
- (is (handler-case :type
- (with-session valid-machine :write [session machine]
- (.setBogusVariable machine nil))
- (handle :invalid-method true)))))
+ (with-session bogus-machine :write [s m])))))
(deftest ^{:integration true}
Please sign in to comment.
Something went wrong with that request. Please try again.