taverna-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stain <...@git.apache.org>
Subject [GitHub] incubator-taverna-common-activities pull request #24: Resolve imports
Date Fri, 21 Apr 2017 08:36:28 GMT
Github user stain commented on a diff in the pull request:

    https://github.com/apache/incubator-taverna-common-activities/pull/24#discussion_r112637921
  
    --- Diff: taverna-cwl-utilities/src/test/java/org/apache/taverna/cwl/utilities/preprocessing/ImportResolutionUtilTest.java
---
    @@ -0,0 +1,90 @@
    +/***************************************************************************************************
    + * Licensed 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.taverna.cwl.utilities.preprocessing;
    +
    +import com.fasterxml.jackson.databind.JsonNode;
    +import org.junit.*;
    +
    +import java.io.File;
    +import java.io.IOException;
    +import java.net.URISyntaxException;
    +import java.nio.file.Paths;
    +
    +import static org.apache.taverna.cwl.utilities.ImportNodeViaFile.getNode;
    +import static org.junit.Assert.assertEquals;
    +
    +public class ImportResolutionUtilTest {
    +    static Process exec;
    +    JsonNode localFile, localFileResult, fileOverHttPWithFragment, fileOverHttPWithFragmentResult,
    +            fileOverHttpWithNamespace, fileOverHttpWithNamespaceResult, testProcessNode,
testProcessNodeResult;
    +
    +    @BeforeClass
    +    public static void setUpHttPServer() throws IOException {
    +        String cmd[] = {"python", "-m", "SimpleHTTPServer", "8000"};
    --- End diff --
    
    Why is this using Python to run a HTTP server? Can we not use Jetty programmatically?
    
    Note that port `8000` might not be free, so this port needs to be bound dynamically (And
then `8000` search-replaced in the rest of the test)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message