nick-boss-tech commented on code in PR #5282:
URL: https://github.com/apache/solr/pull/5282#discussion_r4683381171
##########
solr/webapp/web/js/angular/app.js:
##########
@@ -534,7 +534,8 @@ solrAdminApp.controller('MainController', function($scope,
$route, $rootScope, $
return hasAllRequiredPermissions(permissions, $scope.usersPermissions);
}
- var loadCoresForSelectedNode = function(pageType) {
+ var menuGeneration = 0;
Review Comment:
It only changes when the menu is rebuilt, on navigation and collection
changes, with no background timer behind it, and it is only compared for
equality with the value an in-flight callback captured, so how large it gets
does not matter.
##########
solr/webapp/src/test/org/apache/solr/webapp/AdminUiMenuRefreshTest.java:
##########
@@ -0,0 +1,345 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.solr.webapp;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.openqa.selenium.By;
+import org.openqa.selenium.JavascriptExecutor;
+
+/** Tests menu refresh ordering with the bundled Angular/Chosen UI and
controlled API callbacks. */
+public class AdminUiMenuRefreshTest extends AdminUiTestBase {
+
+ private static final String BOOKS = "{\"collections\":[\"books\"]}";
+ private static final String MAGAZINES = "{\"collections\":[\"magazines\"]}";
+ private static final String NO_ALIASES =
"{\"aliases\":{},\"properties\":{}}";
+ private static final String CLOUD_SYSTEM =
+
"{\"mode\":\"solrcloud\",\"security\":{\"permissions\":[],\"authenticationPlugin\":null}}";
+
+ @Before
+ public void prepareMenuController() {
Review Comment:
As mentioned in my comment above, I removed this test after it ran green in
CI.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]