7676import org .freedesktop .dbus .types .UInt32 ;
7777import org .freedesktop .dbus .types .UInt64 ;
7878import org .freedesktop .dbus .types .Variant ;
79- import org .junit .jupiter .api .AfterAll ;
80- import org .junit .jupiter .api .BeforeAll ;
79+ import org .junit .jupiter .api .AfterEach ;
80+ import org .junit .jupiter .api .BeforeEach ;
8181import org .junit .jupiter .api .Test ;
8282
8383import com .github .hypfvieh .util .TimeMeasure ;
@@ -91,13 +91,13 @@ public class TestAll {
9191 public static final String TEST_OBJECT_PATH = "/TestAll" ;
9292
9393 // CHECKSTYLE:OFF
94- private static DBusConnection serverconn = null ;
95- private static DBusConnection clientconn = null ;
96- private static SampleClass tclass ;
94+ private DBusConnection serverconn = null ;
95+ private DBusConnection clientconn = null ;
96+ private SampleClass tclass ;
9797 // CHECKSTYLE:ON
9898
99- @ BeforeAll
100- public static void beforeClass () throws DBusException {
99+ @ BeforeEach
100+ public void setUp () throws DBusException {
101101 serverconn = DBusConnection .getConnection (DBusBusType .SESSION );
102102 clientconn = DBusConnection .getConnection (DBusBusType .SESSION );
103103 serverconn .setWeakReferences (true );
@@ -111,8 +111,8 @@ public static void beforeClass() throws DBusException {
111111 serverconn .addFallback ("/FallbackTest" , tclass );
112112 }
113113
114- @ AfterAll
115- public static void afterClass () {
114+ @ AfterEach
115+ public void afterClass () {
116116 System .out .println ("Checking for outstanding errors" );
117117 DBusExecutionException dbee = serverconn .getError ();
118118 if (null != dbee ) {
0 commit comments