Forwarding Server #gt1 - Running the full test suite

How is this last stage different in terms of running our code versus the previous stages?

In previous stages we didn’t have to pass any command line arguments to our program.

In this stage we have to, but then the previous stages are failing in the test runner.

Hi @ivanbgd, the last stage doesn’t differ significantly in terms of how your code is executed. All stages are tested using the --resolver flag. The difference is that earlier stages didn’t require you to handle it explicitly.

Suggestion: Focus on completing the last stage first. Once your code handles the --resolver flag properly, it should work seamlessly for all stages.

Hi @andy1li ,

Thank you for the reply.

I was trying to organize code in two different functions: one for standard mode and one for the forwarding mode. Would it make sense to do it that way? I tried to call the standard mode if we don’t receive a CLI argument, but then the previous tests fail, if you know what I mean.

Or does it make more sense if one function handles everything?

I’d recommend using two separate functions for clarity. Let me know if you’d like me to take a look at your code for more specific feedback.

I didn’t split the function in two, but what solved the issue for me was to manually change OpCode::InverseQuery to OpCode::Query. There is one test case that sends OpCode::InverseQuery and it seems like resolver had issues with that.

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.