public void setup()

in phoenix-queryserver-it/src/it/java/org/apache/phoenix/tool/ParameterizedPhoenixCanaryToolIT.java [102:142]


	public void setup() throws Exception {
		String createSchema;
		String createTable;

		if(needsNewCluster()) {
			setClientSideNamespaceProperties();
			setServerSideNamespaceProperties();
			tearDownMiniCluster(NUM_SLAVES_BASE);
			System.setProperty("java.io.tmpdir", tmpDir);
			// FIXME no idea why java.io.tmpdir gets deleted. We don't see this behaviour in 
			// the main phoenix repo with same versions
			File tempDir = new File(tmpDir);
			tempDir.mkdirs();
			setUpTestDriver(new ReadOnlyProps(serverProps.entrySet().iterator()),
					new ReadOnlyProps(clientProps.entrySet().iterator()));
			LOGGER.info("New cluster is spinned up with test parameters " +
					"isPositiveTestType" + this.isPositiveTestType +
					"isNamespaceEnabled" + this.isNamespaceEnabled +
					"resultSinkOption" + this.resultSinkOption);
			connString = BaseTest.getUrl();
			connection = getConnection();
		}

		if (this.isNamespaceEnabled) {
			createSchema = "CREATE SCHEMA IF NOT EXISTS TEST";
			connection.createStatement().execute(createSchema);
		}
		createTable = "CREATE TABLE IF NOT EXISTS TEST.PQSTEST " +
						"(mykey INTEGER NOT NULL PRIMARY KEY, mycolumn VARCHAR," +
						" insert_date TIMESTAMP)";
		connection.createStatement().execute(createTable);
		cmd.add("--constring");
		cmd.add(connString);
		cmd.add("--logsinkclass");
		cmd.add(this.resultSinkOption);
		if (this.resultSinkOption.contains(stdOutSink)) {
			System.setOut(new java.io.PrintStream(out));
		} else {
			loadCanaryPropertiesFile(canaryProp);
		}
	}