You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@submarine.apache.org by GitBox <gi...@apache.org> on 2019/11/04 02:48:43 UTC

[GitHub] [submarine] hhhizzz commented on a change in pull request #79: SUBMARINE-214. [WIP] Add submitter-k8s module

hhhizzz commented on a change in pull request #79: SUBMARINE-214. [WIP] Add submitter-k8s module
URL: https://github.com/apache/submarine/pull/79#discussion_r341892707
 
 

 ##########
 File path: submarine-server/server-submitter/submitter-k8s/src/test/java/org/apache/submarine/server/submitter/k8s/K8sJobSubmitterTest.java
 ##########
 @@ -0,0 +1,96 @@
+/*
+ * 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.submarine.server.submitter.k8s;
+
+import org.apache.submarine.server.submitter.k8s.model.Job;
+import org.apache.submarine.server.submitter.k8s.model.JobList;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+public class K8sJobSubmitterTest {
+  private final String jobName = "mnist";
+  private K8sJobSubmitter submitter;
+  private K8sJobRequest.Path path;
+
+  @Before
+  public void before() throws IOException {
+    String confPath = this.getClass().getResource("/config").getFile();
+    submitter = new K8sJobSubmitter(confPath);
+    path = new K8sJobRequest.Path("kubeflow.org","v1","kubeflow", "tfjobs");
+  }
+
+  @Test
+  public void testCreateCustomJob() throws URISyntaxException {
+    if (getCustomJob() != null) {
+      K8sJobRequest request = new K8sJobRequest(path, null, jobName);
+      Job delJob = submitter.deleteCustomResourceJob(request);
+//      Assert.assertNotNull(delJob);
 
 Review comment:
   I think there should not be any code in comment without any further text comments. You should remove them or add more comments to explain why they exist.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@submarine.apache.org
For additional commands, e-mail: dev-help@submarine.apache.org