400Ping commented on code in PR #964:
URL: https://github.com/apache/yunikorn-core/pull/964#discussion_r1747929018


##########
pkg/webservice/handlers.go:
##########
@@ -855,9 +855,7 @@ func getApplication(w http.ResponseWriter, r *http.Request) 
{
                return
        }
        var app *objects.Application
-       if len(unescapedQueueName) == 0 {
-               app = partitionContext.GetApplication(application)
-       } else {
+       else {
                queueErr := validateQueue(unescapedQueueName)
                if queueErr != nil {
                        buildJSONErrorResponse(w, queueErr.Error(), 
http.StatusBadRequest)

Review Comment:
   So I fix the syntax by changing to 
this(https://github.com/apache/yunikorn-core/commit/aebbea225615f7e6448c341c40373a701663b21a)
   the results in the make test is this:
   ```
   running unit tests
   "go" clean -testcache
   "go" test ./... -race -tags deadlock -coverprofile=build/coverage.txt 
-covermode=atomic
           github.com/apache/yunikorn-core/cmd/queueconfigchecker          
coverage: 0.0% of statements
           github.com/apache/yunikorn-core/cmd/schedulerclient             
coverage: 0.0% of statements
           github.com/apache/yunikorn-core/cmd/simplescheduler             
coverage: 0.0% of statements
           github.com/apache/yunikorn-core/pkg/events/mock         coverage: 
0.0% of statements
           github.com/apache/yunikorn-core/pkg/examples            coverage: 
0.0% of statements
   ?       github.com/apache/yunikorn-core/pkg/handler     [no test files]
   ok      github.com/apache/yunikorn-core/pkg/common      3.070s  coverage: 
74.1% of statements
   ok      github.com/apache/yunikorn-core/pkg/common/configs      3.123s  
coverage: 97.8% of statements
   ok      github.com/apache/yunikorn-core/pkg/common/resources    4.936s  
coverage: 100.0% of statements
           github.com/apache/yunikorn-core/pkg/mock                coverage: 
0.0% of statements
           github.com/apache/yunikorn-core/pkg/rmproxy             coverage: 
0.0% of statements
   ?       github.com/apache/yunikorn-core/pkg/rmproxy/rmevent     [no test 
files]
   ok      github.com/apache/yunikorn-core/pkg/common/security     5.959s  
coverage: 96.8% of statements
   ok      github.com/apache/yunikorn-core/pkg/entrypoint  7.105s  coverage: 
82.1% of statements
   ok      github.com/apache/yunikorn-core/pkg/events      5.834s  coverage: 
97.4% of statements
   ok      github.com/apache/yunikorn-core/pkg/locking     8.267s  coverage: 
51.1% of statements
   ?       github.com/apache/yunikorn-core/pkg/scheduler/placement/types   [no 
test files]
           github.com/apache/yunikorn-core/pkg/webservice/dao              
coverage: 0.0% of statements
   ok      github.com/apache/yunikorn-core/pkg/log 25.608s coverage: 76.3% of 
statements
   ok      github.com/apache/yunikorn-core/pkg/metrics     9.365s  coverage: 
69.5% of statements
   ok      github.com/apache/yunikorn-core/pkg/metrics/history     6.755s  
coverage: 100.0% of statements
   ok      github.com/apache/yunikorn-core/pkg/plugins     5.666s  coverage: 
100.0% of statements
   ok      github.com/apache/yunikorn-core/pkg/scheduler   10.554s coverage: 
68.7% of statements
   ok      github.com/apache/yunikorn-core/pkg/scheduler/objects   7.591s  
coverage: 84.9% of statements
   ok      github.com/apache/yunikorn-core/pkg/scheduler/objects/events    
6.293s  coverage: 100.0% of statements
   ok      github.com/apache/yunikorn-core/pkg/scheduler/objects/template  
6.005s  coverage: 100.0% of statements
   ok      github.com/apache/yunikorn-core/pkg/scheduler/placement 5.608s  
coverage: 100.0% of statements
   ok      github.com/apache/yunikorn-core/pkg/scheduler/policies  5.793s  
coverage: 100.0% of statements
   ok      github.com/apache/yunikorn-core/pkg/scheduler/tests     47.177s 
coverage: [no statements]
   ok      github.com/apache/yunikorn-core/pkg/scheduler/ugm       4.489s  
coverage: 94.5% of statements
   ok      github.com/apache/yunikorn-core/pkg/webservice  5.945s  coverage: 
87.0% of statements
   "go" vet github.com/apache/yunikorn-core/pkg...
   ```



-- 
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]

Reply via email to