Commit 957568d
[Core] Remove reference counter mock for real reference counter in testing (#57178)
This commit takes a step towards utilizing real classes during unit
testing instead of mocks for components that are simple and local (e.g.
reference counter). We remove the reference counter mock as promised in
#57177 (review).
By directly testing on the real reference_counter, we are able to catch
a behavior mismatch between AddNewActorHandle and its doc described
behavior. Specifically, the EmplaceNewActorHandle doc states that the
function should return false instead of failing due to ray check and the
test tests exactly that. However, due to calling AddOwnedObject,
EmplaceNewActorHandle actually ray check fails. The commit addresses
this issue by making AddNewActorHandle idempotent.
---------
Signed-off-by: davik <davik@anyscale.com>
Signed-off-by: Kunchen (David) Dai <54918178+Kunchd@users.noreply.github.com>
Co-authored-by: davik <davik@anyscale.com>
Co-authored-by: Ibrahim Rabbani <irabbani@anyscale.com>
Co-authored-by: Ibrahim Rabbani <israbbani@gmail.com>1 parent 93dad3b commit 957568d
File tree
12 files changed
+130
-260
lines changed- src
- mock/ray/core_worker
- ray
- core_worker
- task_submission/tests
- tests
- pubsub
12 files changed
+130
-260
lines changedThis file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
136 | 136 | | |
137 | 137 | | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
138 | 146 | | |
139 | 147 | | |
140 | 148 | | |
141 | | - | |
| 149 | + | |
142 | 150 | | |
143 | 151 | | |
144 | 152 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| 109 | + | |
109 | 110 | | |
110 | 111 | | |
111 | 112 | | |
| |||
114 | 115 | | |
115 | 116 | | |
116 | 117 | | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
121 | 122 | | |
122 | 123 | | |
123 | 124 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2164 | 2164 | | |
2165 | 2165 | | |
2166 | 2166 | | |
2167 | | - | |
| 2167 | + | |
2168 | 2168 | | |
2169 | | - | |
| 2169 | + | |
| 2170 | + | |
| 2171 | + | |
2170 | 2172 | | |
2171 | 2173 | | |
2172 | 2174 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
865 | 865 | | |
866 | 866 | | |
867 | 867 | | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
868 | 871 | | |
869 | 872 | | |
870 | 873 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| 128 | + | |
| 129 | + | |
128 | 130 | | |
129 | 131 | | |
130 | 132 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
37 | 38 | | |
| 39 | + | |
| 40 | + | |
38 | 41 | | |
39 | 42 | | |
40 | 43 | | |
| |||
54 | 57 | | |
55 | 58 | | |
56 | 59 | | |
| 60 | + | |
| 61 | + | |
57 | 62 | | |
58 | 63 | | |
59 | 64 | | |
| |||
0 commit comments