Testing peer-to-peer (P2P) systems is difficult because of the high numbers of nodes which can be heterogeneous and volatile. A test case may be composed of several ordered actions that may be executed on different nodes. To ensure action ordering and the correct behavior of the test case, a synchronization mechanism is required. In this paper, we propose a synchronization algorithm for executing test case actions in P2P systems. The main goal of the algorithm is to progressively dispatch the actions of a test case to a set nodes and ensure that all nodes completed the execution of an action before dispatching the next one. We validated our synchronization algorithm through implementation and experimentation on an open-source P2P system. The experimentation shows how the algorithm was able to detect implementation problems on the P2P system.