Undefined variables in module 4 pull code

I carefully did the merge but i am having these undefined variables
What to do?

If you read the TODOs, you’ll understand how to initialise these variables and how to use them. You can ignore them after merging until you are done with all milestones.

Oh ok.
Thanks for replying.

If it helped you, please mark it as solution and close the topic.

But i am not able to test PortfolioManagerImpl as it is showing compile error due to undefined variables

Try first finishing all milestones and then testing. It’ll be easier that way. Otherwise some tests will always fail. So if you want, you can manually see which ones are failing and if they are related to code you are yet to work on then you can ignore them. Or you can first complete all milestones and then start testing. Whatever suits you. The first approach is better though.

1 Like

Hey shorya, as he said, his compilation is failing, not the tests. I’m having same problem. In that case only second option seems to work. What do you think??

If I comment out all that code which I am yet to work on, would that work?? I am talking about calculate annualized returns after refactor function in portfoliomanagerapplication.java

Single tests should pass if you comment out any code that will not be called by the tests.
But gradle build would fail.
Unless you know how exactly the test is run,it is advised to follow the approach suggested by shoryajain.
Just follow TODOs and milestone instructions to the word and you should be fine.

Yeah even I prefer the second option. Otherwise one has to run the tests individually on each file and study if they call any other function that hasn’t been made. It does get a bit messy sometimes, but that’s the cost of it.

I am not sure. You can try that. I usually try to run the tests towards end and then go through each failed one and the corresponding milestone to see where the bug is.