Skip to content

Commit

Permalink
fix: Created new test for running topology generation manually from t…
Browse files Browse the repository at this point in the history
…he IDE, and removed main() from TopologyFileGenerator (#3609)
  • Loading branch information
purplefox committed Oct 18, 2019
1 parent 028a94e commit 381e563
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* Copyright 2019 Confluent Inc.
*
* Licensed under the Confluent Community License (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.confluent.io/confluent-community-license
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/

package io.confluent.ksql.test;

import org.junit.Ignore;
import org.junit.Test;

/**
* This test exists only to be able to generate topologies as part of the release process
* It can be run manually from the IDE
* It is deliberately excluded from the test suite
*/
@Ignore
public final class ManualTopologyFileGeneratorTest {

@Test
public void manuallyGenerateTopologies() throws Exception {
TopologyFileGenerator.generateTopologies();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,6 @@ public final class TopologyFileGenerator {
private TopologyFileGenerator() {
}

public static void main(final String[] args) throws Exception {
generateTopologies(findBaseDir());
}

static Path findBaseDir() {
Path path = Paths.get("./ksql-functional-tests");
if (Files.exists(path)) {
Expand All @@ -99,6 +95,10 @@ static Path findBaseDir() {
+ "root of the ksql-functional-tests module");
}

static void generateTopologies() throws Exception {
generateTopologies(findBaseDir());
}

static void generateTopologies(final Path base) throws Exception {
final String formattedVersion = getFormattedVersionFromPomFile();
final Path generatedTopologyPath = base.resolve(formattedVersion);
Expand Down

0 comments on commit 381e563

Please sign in to comment.