blob: 7884ab95981ae65d1af1c87a677a130423f8da09 [file] [log] [blame]
Kristina Chodorow335f0672015-11-16 23:19:13 +00001// Copyright 2015 The Bazel Authors. All rights reserved.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15package com.google.devtools.build.lib.skyframe;
16
17import com.google.devtools.build.lib.testutil.Suite;
18import com.google.devtools.build.lib.testutil.TestSpec;
19
Florian Weikert92b22362015-12-03 10:17:18 +000020import org.junit.Test;
21import org.junit.runner.RunWith;
22import org.junit.runners.JUnit4;
23
Kristina Chodorow335f0672015-11-16 23:19:13 +000024/**
25 * Stress tests for the parallel builder.
26 */
27@TestSpec(size = Suite.MEDIUM_TESTS)
Florian Weikert92b22362015-12-03 10:17:18 +000028@RunWith(JUnit4.class)
Kristina Chodorow335f0672015-11-16 23:19:13 +000029public class ParallelBuilderMediumTest extends ParallelBuilderTest {
30
31 /**
32 * A larger set of tests using randomly-generated complex dependency graphs.
33 */
Florian Weikert92b22362015-12-03 10:17:18 +000034 @Test
Kristina Chodorow335f0672015-11-16 23:19:13 +000035 public void testRandomStressTest1() throws Exception {
36 final int numTrials = 2;
37 final int numArtifacts = 100;
38 final int randomSeed = 43;
39 StressTest test = new StressTest(numArtifacts, numTrials, randomSeed);
40 test.runStressTest();
41 }
42
Florian Weikert92b22362015-12-03 10:17:18 +000043 @Test
Kristina Chodorow335f0672015-11-16 23:19:13 +000044 public void testRandomStressTest2() throws Exception {
45 final int numTrials = 10;
46 final int numArtifacts = 10;
47 final int randomSeed = 44;
48 StressTest test = new StressTest(numArtifacts, numTrials, randomSeed);
49 test.runStressTest();
50 }
51}