You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WLM group custom search settings - groundwork and phase_took
This PR adds the foundational infrastructure for workload group search settings:
- WorkloadGroupSearchSettings enum with validation framework
- search_settings field in MutableWorkloadGroupFragment and WorkloadGroup
- WorkloadGroupRequestOperationListener integration with ClusterService
- phase_took setting implementation
Signed-off-by: David Zane <davizane@amazon.com>
Copy file name to clipboardExpand all lines: plugins/workload-management/src/test/java/org/opensearch/plugin/wlm/action/CreateWorkloadGroupResponseTests.java
+26Lines changed: 26 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -59,8 +59,34 @@ public void testToXContentCreateWorkloadGroup() throws IOException {
59
59
+ " \"resource_limits\" : {\n"
60
60
+ " \"memory\" : 0.3\n"
61
61
+ " },\n"
62
+
+ " \"search_settings\" : { },\n"
62
63
+ " \"updated_at\" : 4513232413\n"
63
64
+ "}";
64
65
assertEquals(expected, actual);
65
66
}
67
+
68
+
/**
69
+
* Test case to validate the toXContent method of CreateWorkloadGroupResponse with search settings.
70
+
*/
71
+
public void testToXContentCreateWorkloadGroupWithSearchSettings() throws IOException {
Copy file name to clipboardExpand all lines: plugins/workload-management/src/test/java/org/opensearch/plugin/wlm/action/GetWorkloadGroupResponseTests.java
+32Lines changed: 32 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -97,6 +97,7 @@ public void testToXContentGetSingleWorkloadGroup() throws IOException {
97
97
"resource_limits" : {
98
98
"memory" : 0.3
99
99
},
100
+
"search_settings" : { },
100
101
"updated_at" : 4513232413
101
102
}
102
103
]
@@ -124,6 +125,7 @@ public void testToXContentGetMultipleWorkloadGroup() throws IOException {
124
125
"resource_limits" : {
125
126
"memory" : 0.3
126
127
},
128
+
"search_settings" : { },
127
129
"updated_at" : 4513232413
128
130
},
129
131
{
@@ -133,6 +135,7 @@ public void testToXContentGetMultipleWorkloadGroup() throws IOException {
133
135
"resource_limits" : {
134
136
"memory" : 0.6
135
137
},
138
+
"search_settings" : { },
136
139
"updated_at" : 4513232415
137
140
}
138
141
]
@@ -153,4 +156,33 @@ public void testToXContentGetZeroWorkloadGroup() throws IOException {
153
156
}""";
154
157
assertEquals(expected, actual);
155
158
}
159
+
160
+
/**
161
+
* Test case to verify toXContent of GetWorkloadGroupResponse with search settings.
162
+
*/
163
+
public void testToXContentGetWorkloadGroupWithSearchSettings() throws IOException {
164
+
List<WorkloadGroup> workloadGroupList = new ArrayList<>();
Copy file name to clipboardExpand all lines: plugins/workload-management/src/test/java/org/opensearch/plugin/wlm/action/UpdateWorkloadGroupResponseTests.java
+26Lines changed: 26 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -60,8 +60,34 @@ public void testToXContentUpdateSingleWorkloadGroup() throws IOException {
60
60
+ " \"resource_limits\" : {\n"
61
61
+ " \"memory\" : 0.3\n"
62
62
+ " },\n"
63
+
+ " \"search_settings\" : { },\n"
63
64
+ " \"updated_at\" : 4513232413\n"
64
65
+ "}";
65
66
assertEquals(expected, actual);
66
67
}
68
+
69
+
/**
70
+
* Test case to verify the toXContent method of UpdateWorkloadGroupResponse with search settings.
71
+
*/
72
+
public void testToXContentUpdateWorkloadGroupWithSearchSettings() throws IOException {
0 commit comments