A Pak'n Save worker walked out of an Auckland store after a colleague said "good morning" to him, following an agreement the two men would not speak to each other in the workplace.
The arrangement - which supermarket bosses reluctantly agreed to - was put in place after the second man wrote "I am gay" on the first man's name badge.
Jacob Abiar resigned from Pak'n Save Glen Innes in September 2013 following the disagreement, saying the supermarket chain had failed to prevent him being harassed at work.
Mr Abiar, who had been working at the supermarket since 2011, "took umbrage" that Mobin Ansorali greeted him as he arrived for work on the morning of September 18. Mr Ansorali said it was the same greeting he had given to other staff and customers who walked into the store that day.
But Mr Abiar claimed it was an example of him being subjected to racial abuse and harassment at work, and he resigned saying Pak'n Save was not serious about solving his difficulties with Mr Ansorali.
He took his complaint to the Employment Relations Authority (ERA).
However, the authority sided with his former employer, and praised the supermarket for its efforts to resolve the dispute between the two men and to keep them both employed.
It said accusations of racism and harassment "were not substantiated" during its investigation.
"Pak'n Save is a multicultural workplace employing some 34 different nationalities. It is sensitive to cultural and language issues and proactively takes steps to ensure that all employees feel comfortable, welcome and supported in the workplace," the ERA said in its determination.
It noted that both Mr Abiar and Mr Ansorali "come from troubled backgrounds", and said it was "satisfied that Pak'n Save was sensitive to that, so wished to support both of them to integrate into their new life in New Zealand".
The two men appeared to have a poor relationship from the start, resulting from Mr Ansorali's "teasing" of Mr Abiar. It came to a head in January 2012 when Mr Ansorali wrote, 'I am gay', on Mr Abiar's name badge.
Mr Abiar, who is not gay, was "very upset about this", the authority said. He complained to management, who issued Mr Ansorali with a final written warning and ordered him to apologise to Mr Abiar.
The pair were then separated at Mr Abiar's request, with Mr Abiar relocated to the grocery department, and Mr Ansorali remaining in the produce department. An agreement was also reached that they would not speak to each other to avoid further issues.
The ERA noted that Pak'n Save "found that undesirable in terms of collegial workplace relations", but nevertheless agreed to it in order to "ensure workplace harmony".
No further issues arose until the September 2013 incident, when Mr Ansorali greeted Mr Abiar as he arrived for work. Mr Abiar then left work without telling anyone, and when he was contacted by his manager he was described as "highly agitated and clearly very upset".
He refused to return to work, and said he was "so angry that if he came back into work he would get a knife and 'kill' Mr Ansorali, so it was better for him to stay away", the ERA recorded.
His managers tried to persuade him to return, saying he was considered a good worker and the supermarket "did not want to lose him". A formal investigation also took place into all the allegations Mr Abiar set out in a subsequent letter. But, he did not return to work.
Authority member Rachel Larmer said she was satisfied that he resigned voluntarily, and that "Pak'n Save did not fundamentally breach a duty to Mr Abiar".
"Nor did it engage in a concerted course of conduct designed to induce Mr Abiar's resignation. Quite the contrary," Ms Larmer said.
"Pak n Save made it very clear to Mr Abiar that it considered that he was a valued employee ... and it is clear from the evidence that Pak'n Save took steps to address Mr Abiar's concerns and to encourage him to return to work."
Ms Larmer added: "Although I realise Mr Abiar does not agree with me, my objective view based on the evidence I heard is that Pak'n Save did support Mr Abiar in the workplace and it did take concerns he raised seriously.
"I consider that Mr Abiar was ill-disposed to Mr Ansorali because of what had occurred in January 2012. Mr Abiar therefore took umbrage when he was greeted by Mr Ansorali in September 2013, so decided he wanted to resign."
His claim of unjustified dismissal was rejected.