<commit_before>package storage

import "testing"

/**
 * ZooKeeper Storage Manager Test
 *
 * @author: <NAME>
 * @date: 05/11/2014
 */

func TestBasicLeaderModified(t *testing.T) {
  servers := "localhost:2181"
  sm := MakeStorageManager()
  sm.Open(servers)
  defer sm.Close()
  sm.Create("/test", "")
  sm.Create("/test/_var_tmp_824-1000_px-12568-basic-1", "")
  sm.Create("/test/_var_tmp_824-1000_px-12568-basic-1/store", "")
  sm.Create("/test/_var_tmp_824-1000_px-12568-basic-1/done", "")
  sm.Create("/test/_var_tmp_824-1000_px-12568-basic-1/store/0", "6.824")

  _ = sm.Write("/test/_var_tmp_824-1000_px-12568-basic-1/store/0", "6.824")
  data, _ := sm.Read("/test/_var_tmp_824-1000_px-12568-basic-1/store/0")
  if data != "6.824" {
    t.Fatalf("got=%v wanted=%v", data, "6.824")
  }

  sm.Close(servers)
  sm.Open(servers)
  data, _ := sm.Read("/test/_var_tmp_824-1000_px-12568-basic-1/store/0")
  if data != "6.824" {
    t.Fatalf("got=%v wanted=%v", data, "6.824")
  }
}
<commit_msg>more tests<commit_after>package storage

import "testing"

/**
 * ZooKeeper Storage Manager Test
 *
 * @author: <NAME>
 * @date: 05/11/2014
 */

func TestBasicLeaderModified(t *testing.T) {
  servers := "localhost:2181"
  sm := MakeStorageManager()
  sm.Open(servers)
  defer sm.Close()
  sm.Create("/test", "")
  sm.Create("/test/_var_tmp_824-1000_px-12568-basic-1", "")
  sm.Create("/test/_var_tmp_824-1000_px-12568-basic-1/store", "")
  sm.Create("/test/_var_tmp_824-1000_px-12568-basic-1/done", "")
  sm.Create("/test/_var_tmp_824-1000_px-12568-basic-1/store/0", "6.824")

  _ = sm.Write("/test/_var_tmp_824-1000_px-12568-basic-1/store/0", "6.824")
  data, _ := sm.Read("/test/_var_tmp_824-1000_px-12568-basic-1/store/0")
  if data != "6.824" {
    t.Fatalf("got=%v wanted=%v", data, "6.824")
  }

  sm.Close()
  sm.Open(servers)
  data, _ := sm.Read("/test/_var_tmp_824-1000_px-12568-basic-1/store/0")
  if data != "6.824" {
    t.Fatalf("got=%v wanted=%v", data, "6.824")
  }
  sm.Close()
}

{'fraction_non_alphanumeric': 0.21346057257659468, 'fraction_numerical': 0.131592164741336, 'mean_word_length': 3.720379146919431, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2630609', 'n_tokens_mistral': 992, 'n_tokens_neox': 866, 'n_words': 102}