Add some Serializable tests (exceptions)
This commit is contained in:
parent
9448d2b3ce
commit
8f8ab99e95
3 changed files with 13 additions and 3 deletions
|
|
@ -90,7 +90,12 @@ nippy/stress-data
|
||||||
:uuid (java.util.UUID/randomUUID)
|
:uuid (java.util.UUID/randomUUID)
|
||||||
:date (java.util.Date.)
|
:date (java.util.Date.)
|
||||||
|
|
||||||
:stress-record (->StressRecord "data")}
|
:stress-record (->StressRecord "data")
|
||||||
|
|
||||||
|
;; Serializable
|
||||||
|
:throwable (Throwable. "Yolo")
|
||||||
|
:exception (try (/ 1 0) (catch Exception e e))
|
||||||
|
:ex-info (ex-info "ExInfo" {:data "data"})}
|
||||||
```
|
```
|
||||||
|
|
||||||
Serialize it:
|
Serialize it:
|
||||||
|
|
|
||||||
|
|
@ -481,7 +481,12 @@
|
||||||
:uuid (java.util.UUID/randomUUID)
|
:uuid (java.util.UUID/randomUUID)
|
||||||
:date (java.util.Date.)
|
:date (java.util.Date.)
|
||||||
|
|
||||||
:stress-record (->StressRecord "data")}))
|
:stress-record (->StressRecord "data")
|
||||||
|
|
||||||
|
;; Serializable
|
||||||
|
:throwable (Throwable. "Yolo")
|
||||||
|
:exception (try (/ 1 0) (catch Exception e e))
|
||||||
|
:ex-info (ex-info "ExInfo" {:data "data"})}))
|
||||||
|
|
||||||
;;;; Deprecated API
|
;;;; Deprecated API
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
[taoensso.nippy.benchmarks :as benchmarks]))
|
[taoensso.nippy.benchmarks :as benchmarks]))
|
||||||
|
|
||||||
;; Remove stuff from stress-data that breaks roundtrip equality
|
;; Remove stuff from stress-data that breaks roundtrip equality
|
||||||
(def test-data (dissoc nippy/stress-data :bytes))
|
(def test-data (dissoc nippy/stress-data :bytes :throwable :exception :ex-info))
|
||||||
|
|
||||||
(defn- before-run {:expectations-options :before-run} [])
|
(defn- before-run {:expectations-options :before-run} [])
|
||||||
(defn- after-run {:expectations-options :after-run} [])
|
(defn- after-run {:expectations-options :after-run} [])
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue