anchor.diff:      cass2 = nodeCfg "192.168.1.3" { jvmOpts = [ "-Dcassandra.replace_address=cass1" ]; };
     };
   
  -  testScript = ''
  +  testScript = let
  +    jmxPortS = toString jmxPort;
  +  in ''
       # Check configuration
       subtest "Timers exist", sub {
         $cass0->succeed("systemctl list-timers | grep cassandra-full-repair.timer");
  
positive.code:       package = testPackage;
        maxHeapSize = "${numMaxHeapSize}M";
        heapNewSize = "100M";
      };
    nodeCfg = ipAddress: extra: {pkgs, config, ...}:
      { environment.systemPackages = [ testPackage ];
        networking = {
          firewall.allowedTCPPorts = [ 7000 7199 9042 ];
          useDHCP = false;
          interfaces.eth1.ipv4.addresses = pkgs.lib.mkOverride 0 [
            { address = ipAddress; prefixLength = 24; }
          ];
        };
        services.cassandra = cassandraCfg ipAddress // extra;
        virtualisation.memorySize = 1024;
      };
  in
  {
    name = "cassandra-ci";
  
negative.code:   jmxRoles = [{ username = "me"; password = "password"; }];
    jmxRolesFile = ./cassandra-jmx-roles;
    jmxAuthArgs = "-u ${(builtins.elemAt jmxRoles 0).username} -pw ${(builtins.elemAt jmxRoles 0).password}";
    jmxPort = 7200;  # Non-standard port so it doesn't accidentally work
  
    # Would usually be assigned to 512M
    numMaxHeapSize = "400";
    getHeapLimitCommand = ''
      nodetool info -p ${toString jmxPort} | grep "^Heap Memory" | awk \'{print $NF}\'
    '';
    checkHeapLimitCommand = ''
      [ 1 -eq "$(echo "$(${getHeapLimitCommand}) < ${numMaxHeapSize}" | ${pkgs.bc}/bin/bc)" ]
  