Skip to content
This repository was archived by the owner on Feb 24, 2026. It is now read-only.
This repository was archived by the owner on Feb 24, 2026. It is now read-only.

JsonStreamWritertest doesn't fail when expected exception isn't thrown #584

@elharo

Description

@elharo

  @Test
  public void testTwoParamNewBuilder() throws Exception {
    try {
      getTestJsonStreamWriterBuilder(null, TABLE_SCHEMA);
    } catch (NullPointerException e) {
      assertEquals(e.getMessage(), "StreamName is null.");
    }

    try {
      getTestJsonStreamWriterBuilder(TEST_STREAM, null);
    } catch (NullPointerException e) {
      assertEquals(e.getMessage(), "TableSchema is null.");
    }

    JsonStreamWriter writer = getTestJsonStreamWriterBuilder(TEST_STREAM, TABLE_SCHEMA).build();
    assertEquals(TEST_STREAM, writer.getStreamName());
  }

Metadata

Metadata

Labels

api: bigquerystorageIssues related to the googleapis/java-bigquerystorage API.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions