Home / Function/ smokeTest() — netty Function Reference

smokeTest() — netty Function Reference

Architecture documentation for the smokeTest() function in CodecMarshallingTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  b7dce377_8124_d9a5_35a2_b24ca8dd513b["smokeTest()"]
  14b8aafa_76bf_884b_ffb0_43fffd1a0f7b["CodecMarshallingTest"]
  b7dce377_8124_d9a5_35a2_b24ca8dd513b -->|defined in| 14b8aafa_76bf_884b_ffb0_43fffd1a0f7b
  style b7dce377_8124_d9a5_35a2_b24ca8dd513b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

testsuite-jpms/src/test/java/io/netty/testsuite_jpms/test/CodecMarshallingTest.java lines 35–56

    @Test
    public void smokeTest() throws Exception {
        @SuppressWarnings("RedundantStringConstructorCall")
        String testObject = new String("test");
        MarshallingConfiguration configuration = new MarshallingConfiguration();
        configuration.setVersion(5);
        MarshallerFactory marshallerFactory = Marshalling.getProvidedMarshallerFactory("serial");
        DefaultMarshallerProvider provider = new DefaultMarshallerProvider(marshallerFactory, configuration);
        EmbeddedChannel ch = new EmbeddedChannel(new CompatibleMarshallingEncoder(provider));
        ch.writeOutbound(testObject);
        assertTrue(ch.finish());
        ByteBuf buffer = ch.readOutbound();
        Unmarshaller unmarshaller = marshallerFactory.createUnmarshaller(configuration);
        unmarshaller.start(Marshalling.createByteInput(buffer.nioBuffer()));
        String read = (String) unmarshaller.readObject();
        assertEquals(testObject, read);
        assertEquals(-1, unmarshaller.read());
        assertNull(ch.readOutbound());
        unmarshaller.finish();
        unmarshaller.close();
        buffer.release();
    }

Domain

Subdomains

Frequently Asked Questions

What does smokeTest() do?
smokeTest() is a function in the netty codebase, defined in testsuite-jpms/src/test/java/io/netty/testsuite_jpms/test/CodecMarshallingTest.java.
Where is smokeTest() defined?
smokeTest() is defined in testsuite-jpms/src/test/java/io/netty/testsuite_jpms/test/CodecMarshallingTest.java at line 35.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free