Skip to content

Prevent testsuite from reading user settings and data #10170

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
May 11, 2020
Merged
Next Next commit
CommandLineTest: Run findBuildPaths only once
Previously, it was ran before each test, but just running it once before
all tests is sufficient. So switch from @before to @BeforeClass and make
the its result variable static.
  • Loading branch information
matthijskooijman committed May 7, 2020
commit da43209aa67da9b490d5057516f5595fc581aa70
10 changes: 5 additions & 5 deletions app/test/processing/app/CommandLineTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,19 @@

import org.apache.commons.compress.utils.IOUtils;
import org.fest.assertions.Assertions;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;

import processing.app.helpers.OSUtils;
import processing.app.helpers.PreferencesMap;

public class CommandLineTest {

File buildPath;
File arduinoPath;
private static File buildPath;
private static File arduinoPath;

@Before
public void findBuildPaths() throws Exception {
@BeforeClass
public static void findBuildPaths() throws Exception {
buildPath = new File(System.getProperty("user.dir"));
while (!new File(buildPath, "build").isDirectory()) {
buildPath = buildPath.getParentFile();
Expand Down