Skip to content

Gazelle: Have way to turn off the java_binary generation in the java tests area #377

@tjoneslo

Description

@tjoneslo

This is an odd edge case from a client using a great number of GRPC services, and then trying to write tests around them. The general form of the test is:

public class ApplicationTest {

    @Test
    public void testLifecycle() throws Exception {
        final TestApplication application = new TestApplication();
         application.start();
         application.stop();
        // Test using application here. 
    }

    public static class TestApplication extends RealApplication {
        public static void main(String[] args) throws Exception {
            main(TestApplication.class, args);
        }
    }
}

When run through gazelle, it generates both a java_test_suite for the ApplicationTest and a java_binary for the ApplicationTest.TestApplication. I would like to be able to turn off the latter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions