Adversities cause tensions, and these in turn show themselves in human relations. James therefore warns us to not grumble one against another. Such action places them in danger of judgment, and the judge stands at the door. Take the Old Testament prophets who have spoken in the name of the Lord, for an example of suffering affliction, and of patience. The prophets, on whom God bestowed the greatest honor, and for whom he had the greatest favor, were those who were the greatest examples of suffering affliction and were also the best and greatest examples of patience.
Tribulation works patience and strengthens faith.
We have heard of the remarkable patience of Job and of how he was happy in the end. We have seen the end of the work of the Lord concerning Job, and how he rewarded Job out of pity and mercy even though God allowed Satan to bring this affliction on him. And we know that all things work together for good to them that love God, to them who are the called according to his purpose. Christians should not swear, that is to take or declare an oath, promise or testimony. Neither by heaven.