func TestOpenMonitoringSession(t *testing.T) {
	var sm drmaa2.SessionManager
	ms, err := sm.OpenMonitoringSession("")
	if err != nil {
		t.Errorf("Couldn't open Monitoring session. %s", err)
		if ms != nil {
			t.Errorf("MonitoringSession needs to be nil in case of error")
		}
		return
	}
	t.Log("OpenMonitoringSession() created a MonitoringSession succesfully")
	if err := ms.CloseMonitoringSession(); err != nil {
		t.Errorf("CloseMonitoringSession() returned error: %s", err)
	}
}
Tests if MonitoringSession can be opened and closed.
Requires the libdrmaa2.so in $LD_LIBRARY_PATH.
package drmaa2_test
import (
	"fmt"
	"github.com/dgruber/drmaa2"
	"testing"
)